401 Error:UnAuthorized to Access Webservice RRS feed

  • Question

  • I  have developed  CRM4.0 webApplication using CRM.0 webservice which works vey well in My Local machine.

    I have Created Virtual Directory in IIS . and Deployed My CRM webApplication into the Virtual Directory .I am not able to Run My webApplication and I am getting the below Error:

    The request failed with HTTP status 401: Unauthorized.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.

    Source Error:

    Line 341:    [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.microsoft.com/crm/2007/WebServices/RetrieveMultiple", RequestNamespace="http://schemas.microsoft.com/crm/2007/WebServices", ResponseNamespace="http://schemas.microsoft.com/crm/2007/WebServices", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    Line 342:    public BusinessEntityCollection RetrieveMultiple(QueryBase query) {
    Line 343:      object[] results = this.Invoke("RetrieveMultiple", new object[] {
    Line 344:            query});
    Line 345:      return ((BusinessEntityCollection)(results[0]));

    Please suggest me the Solution

    Thursday, July 22, 2010 4:55 AM


  • Firstly, you should if possible deploy your CRM custom apps in the CRMWeb\ISV folder.

    However, you r issue is clearly an authentication issue. Have you set your virtual directory to use Windows authentication, and turned off Anonymous authentication?

    MSCRM Bing'd - http://bingsoft.wordpress.com
    • Marked as answer by Jim Glass Jr Thursday, July 22, 2010 5:38 PM
    Thursday, July 22, 2010 8:58 AM