Wednesday, February 16, 2011

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the error message:

if u will get error message like this while in plugin or else using the sdk for any external application.
make sure the crmserver url is correct.
some times we used to forget to add the port number if its thr.

yes.sudhanshu

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the error message:

if u will get error message like this while in plugin or else using the sdk for any external application.
make sure the crmserver url is correct.
some times we used to forget to add the port number if its thr.

yes.sudhanshu

Invalid Action, the selected action was not valid error in ms crm 4.0

If such kind of error Invalid Action, the selected action was not valid in ms crm 4.0 while loggin in or else already logged in and trying to acces any record or doing some action,
then just try to make the MSCRMAsynchronous Service up.
Even if its showing started in the services, just restart it.

This is a way i hv solved.

yes.sudhanshu

Wednesday, February 9, 2011

refreshing continuously the textbox(textarea) in dot net

some times we need to show the status to the user if some log process is going on. also if any exception in that process.
for that if we will write the message to a textbox(textarea), it will look like realtime message as follow.

the textbox(textarea) control name is "txtStatus"
//each time append the new text to the previous text
txtStatus.Text += "Message from the businees logic to be displayed.";
// this main to just update the control , so that the new text will refreshed
txtStatus.Update();

yes.sudhanshu

Getting project current path in dot net

just use this to get the project current path.
soem times we need to create the log folder inside the project path with bin and other folders.
this is in windows application.

string path = Directory.GetParent(Path.GetDirectoryName(Application.StartupPath)).FullName;

yes.sudhanshu