locked
HTTP Error 401. The requested resource requires user authentication. RRS feed

  • Question

  • User1462999811 posted

    I am having an issue using Windows Authentication in IIS 7.5. I am getting a "HTTP Error 401. The requested resource requires user authentication" error when accessing my page. The funny thing is, when I go to "https://svr.mysite.com/app", I get the 401 error. But, if I alter my hostfile to go to "https://svr1.mysite.com/app" (same IP as the previous URL), everything works as it should. Does anyone have any ideas as to why this may be?

    Tuesday, June 17, 2014 11:07 AM

Answers

  • User-484054684 posted

    Are you sure these two are pointing to the same server (IP) i.e., https://svr.mysite.com/app and https://svr1.mysite.com/app ?

    Also check if you have configured domain names anywhere in IIS host settings.

    A sample instruction how a host header might have been added into your IIS as follows from MSDN:

    Open IIS Manager. For information about opening IIS Manager, see Open IIS Manager (IIS 7).

    • In the Connections pane, expand the Sites node in the tree, and then select the site for which you want to configure a host header.

    • In the Actions pane, click Bindings.

    • In the Site Bindings dialog box, select the binding for which you want to add a host header and then click Edit or click Add to add a new binding with a host header.

    • In the Host name box, type a host header for the site, such as www.contoso.com.

    • Click OK.

    • To add an additional host header, create a new binding with the same IP address and port, and the new host header. Repeat for each host header that you want to use this IP address and port.

    • Reference: http://technet.microsoft.com/en-us/library/cc753195(v=ws.10).aspx
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 17, 2014 5:04 PM

All replies

  • User-484054684 posted

    Are you sure these two are pointing to the same server (IP) i.e., https://svr.mysite.com/app and https://svr1.mysite.com/app ?

    Also check if you have configured domain names anywhere in IIS host settings.

    A sample instruction how a host header might have been added into your IIS as follows from MSDN:

    Open IIS Manager. For information about opening IIS Manager, see Open IIS Manager (IIS 7).

    • In the Connections pane, expand the Sites node in the tree, and then select the site for which you want to configure a host header.

    • In the Actions pane, click Bindings.

    • In the Site Bindings dialog box, select the binding for which you want to add a host header and then click Edit or click Add to add a new binding with a host header.

    • In the Host name box, type a host header for the site, such as www.contoso.com.

    • Click OK.

    • To add an additional host header, create a new binding with the same IP address and port, and the new host header. Repeat for each host header that you want to use this IP address and port.

    • Reference: http://technet.microsoft.com/en-us/library/cc753195(v=ws.10).aspx
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 17, 2014 5:04 PM
  • User1815411410 posted

    Hi there,

    I agree with Siva,

    The issue is certainly with the website IIS Bindings.

    I believe that you may have forgotten to add the site bindings properly.

    Wednesday, June 18, 2014 12:24 AM