A
Alexandru Florea
Hello,
I tried to acces a web service from a C# application running on a pocketPC.
It only works if I enable anonymous acces in IIS authentication properties.
Otherwise I got the following error :
"Server found request content type to be 'text/html', but expected
'text/xml'."
The code I used look like this:
phws3001 phws3001WebService = new phws3001();
phws3001WebService.Url = GlobalVarsClass.sWebServiceURL;
phws3001WebService.PreAuthenticate = true;
// Set the client-side credentials using the Credentials property.
NetworkCredential myCred = new NetworkCredential(GlobalVarsClass.sLoginName,
GlobalVarsClass.sLoginPass);
phws3001WebService.Credentials = myCred;
string sData = phws3001WebService.SyncronizeData();
In a PC desktop applocation I should use the CredentialCache class in order
to work properly, but .NET Compact Framework doesn't support this class.
An embeddedVB 3.0 application using the same WebService and running on the
same pocket works ok, so it should work in C# either, I supose.
Any ideea ?
Thank you,
Alex
I tried to acces a web service from a C# application running on a pocketPC.
It only works if I enable anonymous acces in IIS authentication properties.
Otherwise I got the following error :
"Server found request content type to be 'text/html', but expected
'text/xml'."
The code I used look like this:
phws3001 phws3001WebService = new phws3001();
phws3001WebService.Url = GlobalVarsClass.sWebServiceURL;
phws3001WebService.PreAuthenticate = true;
// Set the client-side credentials using the Credentials property.
NetworkCredential myCred = new NetworkCredential(GlobalVarsClass.sLoginName,
GlobalVarsClass.sLoginPass);
phws3001WebService.Credentials = myCred;
string sData = phws3001WebService.SyncronizeData();
In a PC desktop applocation I should use the CredentialCache class in order
to work properly, but .NET Compact Framework doesn't support this class.
An embeddedVB 3.0 application using the same WebService and running on the
same pocket works ok, so it should work in C# either, I supose.
Any ideea ?
Thank you,
Alex