0

My web site is perfectly working on 8081 port in localhost, In order to provide host name I had to set IIS bindings, Bindings are set correctly. Additionally I set the host name in host file as well. When I browse website via hostname I am getting below error

"Error Message - HTTP Error 401.0 - Unauthorized" Please note that I am using IIS 10

KDS
  • 99
  • 1
  • 16
  • https://learn.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/troubleshoot-with-failed-request-tracing You'd better use FRT to take a deeper look. It is not likely to be from IIS (as that usually should be 401.1 or 401.3) – Lex Li Nov 22 '22 at 18:34
  • It is recommended that you enable detailed errors in IIS and provide detailed error messages. By the way, does your project work fine in local development environment? – YurongDai Nov 23 '22 at 03:04
  • yes , it is working fine in local development environment , Once i deployed it works in IIS via localhost as well – KDS Nov 23 '22 at 04:59
  • Could you provide detailed error message or screenshot of detailed error page? Please pay attention to hiding private information. – YurongDai Nov 23 '22 at 07:38

2 Answers2

0

I was able to resolve the issue by following this reference: Getting windows authentication to work through local IIS

Mugabo
  • 753
  • 7
  • 13
KDS
  • 99
  • 1
  • 16
  • Hi, I'm glad your problem is solved. There are many responses in the link you provided, could you share the specific solution? You can re-edit your answer to make it more detailed. Thanks a lot. – YurongDai Nov 24 '22 at 02:21
  • Hi, even though a link can lead to an awnser it isn't an awnser. Please awnser or give some type of short overview about the solution. – NameVergessen Nov 27 '22 at 14:14
0

You have to whitelist a domain specified in the hosts file in order for windows authentication to work. Try these steps:

  1. Click Start, click Run, type regedit, and then click OK.
  2. In Registry Editor, locate the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
  3. Right-click Parameters, click New, and then click DWORD (32-bit) Value.
  4. Type DisableStrictNameChecking and press ENTER.
  5. Double-click the DisableStrictNameChecking registry value and type 1 in the Value data box, click OK
  6. In Registry Editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
  7. Right-click MSV1_0, point to New, and then click Multi-String Value.
  8. Type BackConnectionHostNames, and then press ENTER.
  9. Right-click BackConnectionHostNames, and then click Modify.
  10. In the Value data box, type the host name or the host names for the sites that are on the local computer, and then click OK.
  11. Quit Registry Editor, and then restart the IISAdmin service.
Mugabo
  • 753
  • 7
  • 13
KDS
  • 99
  • 1
  • 16