locked
IIS 7 and CRM SDK? RRS feed

  • Question

  • Hi all:

    I am working on an ASP.NET application connecting to CRM running on WS 2008 and IIS 7. I have set the Anonymous Authentication to Enabled and the Windows Authentication to Enabled as with IIS 6, but when I try to access the page I get an error message:

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

    I created a new web site on port 99 called Dev, and then a virtual directory under that called Test, and set the authentication as noted on both. I tried putting the project directory under the ISV folder as I had seen noted several times, but no joy....

    Has anyone deployed an ASP.NET app on IIS 7 and can tell me if there are some settings I need to change?

    Thanks for any and all help.

    John.

    Friday, October 9, 2009 1:52 AM
    Moderator

Answers

  • I found it, this line:

    service.CrmAuthenticationTokenValue = token;

    was commented out!

    AAAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHH!!
    Friday, October 9, 2009 3:02 PM
    Moderator

All replies

  • hi John
    Longtime no hear!
    You will be glad to know the Blue Bulls are still in the running for the ABSA Currie Cup! :)

    you can try this:

    There are several things you need to verify.

    1. Does the web service you are trying to access allow Anonymous Access? Authentication can be tricky for web-to-web calls
    2. What is the web application running under, IWAM_xxx or IUSR_xxx? Or are you using an application pool running under a specific identity?
    3. You may want to make sure your web application server's ASPNET or NETWORK SERVICE accounts can access your web service server.

    Tiaan van Niekerk http://crmdelacreme.blogspot.com Skype:tiaan.van.niekerk1
    Friday, October 9, 2009 4:33 AM
  • Try adding this in the httpModules node in the system.web section in your web.config:

    <httpModules>
        <clear />
    </httpModules>

    This removes the authentication headers that are added by the CRM web.config file and is necessary to enable anonymous access to pages that are located in a folder under the CRM web root.
    Friday, October 9, 2009 8:04 AM
  • I found it, this line:

    service.CrmAuthenticationTokenValue = token;

    was commented out!

    AAAAAAAAAAAAAAAAAAGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHH!!
    Friday, October 9, 2009 3:02 PM
    Moderator