| Hello Forum,
Here is something I have been struggling for very long now.
I have got a Windows Application(TestHarness) which talks to a HTTPS web service(ProvisionSvc).
When I run my Windows application in Debug mode, it gives me an error “The request failed with HTTP status 401: Authorization Required.”
Further details include it being something like a WebException.ProtocolError.
But, the code works fine as a compiled EXE.
Also, if I create a package for this application and then deploy the machine on a machine other than the development machine, it gives an error saying “The underlying connection was closed: An unexpected error occurred on a send.”
###########################################################################
public ServiceHelper(string url,bool useNTLMAuthSvc)
{
m_service.Url = url;
m_service.Timeout = System.Threading.Timeout.Infinite;
m_service.Credentials = new System.Net.NetworkCredential (”Administrator”,”Password”,”Domain”); //System.Net.CredentialCache.DefaultCredentials;
m_service.PreAuthenticate = true;
//m_bUseNTLMAuthService = useNTLMAuthSvc;
}
The error occurs at the following function;
public LookupResponseType DoLookup(LookupRequestType request)
{
return m_service.LookUpRequest(request);
}
###########################################################################
Please advise.
Best Regards,
|