Webservice Generator returns 401 error
search cancel

Webservice Generator returns 401 error

book

Article ID: 176935

calendar_today

Updated On:

Products

Workflow Solution

Issue/Introduction

Webservice Generator returns a 401 error when attempting to login using a domain account that does have access the the webservice.  The details of the error message are below:


Cannot get request from
url:http://servername/webservice.asmx


System.Net.WebException: The remote server returned an error: (401) Unauthorized.
   at System.Net.HttpWebRequest.GetResponse()
   at LogicBase.Framework.WSDLProxyGen.ReadService(ICredentials credentials, String url, ServiceDescriptionImporter importer)
   at LogicBase.Framework.WSDLProxyGen.GenerateProxy(ICredentials credentials)
   at LogicBase.Framework.WSDLProxyGen.GenerateProxyAssembly(Boolean generateInMemory, ICredentials credentials)
   at LogicBase.Framework.WebserviceParser.Load(String PathToSourceWSDL, Boolean generateProxyAssemblyInMemory)
   at LogicBase.Framework.WebserviceParser.Load(String PathToSourceWSDL)
   at LogicBase.Components.DynamicWebserviceCaller.DynamicWebServiceGenerator.GetWebMethods(UrlReference[] urls)
System.Net.WebException: The remote server returned an error: (401) Unauthorized.
   at System.Net.HttpWebRequest.GetResponse()
   at LogicBase.Framework.WSDLProxyGen.ReadService(ICredentials credentials, String url, ServiceDescriptionImporter importer)
   at LogicBase.Framework.WSDLProxyGen.GenerateProxy(ICredentials credentials)
   at LogicBase.Framework.WSDLProxyGen.GenerateProxyAssembly(Boolean generateInMemory, ICredentials credentials)
   at LogicBase.Framework.WebserviceParser.Load(String PathToSourceWSDL, Boolean generateProxyAssemblyInMemory)
   at LogicBase.Framework.WebserviceParser.Load(String PathToSourceWSDL)
   at LogicBase.Components.DynamicWebserviceCaller.DynamicWebServiceGenerator.GetWebMethods(UrlReference[] urls)

Cause

The backslash "\" used for the username is not recognized, and will corrupt the authentication request from the webservice generator.

Resolution

To login using the Webservice Generator, you will need to specify the username without the "domain\" in the username: field.  If the server is a domain member server, the authentication request is passed to the server and will continue with the wizard. 


If this server is not a domain member server and/or does not have a trust relationship to the domain that contains your user account, you will need to modify the IIS Virtual directory or the webservice to allow authentication:
    1. Right click and choose properties of the .asmx page that you are using for the Webservice Generator 
    2. Choose the Directory Security tab
    3. Click Edit to modify the Authentication and Access Control
    4. Choose the Basic Authentication checkbox and specify the users Domain and Realm
    5. Restart the Webservice Generator and perform the authentication attempt again

Applies To
Workflow Solution 6.5

Attachments