A windows service was developed and runs on a 32 bit machine. It communicates to the Project Web Access web service. Now, the service was moved to the same computer as the Project Web Access web service. The code fails and I recieve this error:
System.Net.WebException: The request failed with HTTP status 401: Unauthorized. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at ProjToolService.ProjectWebSvc.Project.ReadProject(Guid projectUid, DataStoreEnum dataStore)
at ProjToolService.Queue.AssignResource(Guid queueId, Guid projectId, Guid taskId, Guid resourceId, Guid assignmentId)
It may not be the 32bit vs 64bit, but I have no other ideas.
The target platform is x86, but it also failed using AnyCPU. I tried using DefaultCredentials
and System.net.CredentialCache.DefaultNetworkCredential
as well.