c# - 401 Unauthorized error web api mvc windows authentication -


i getting 401 unauthorized error . web service written in mvc . in iis configured use windows authentication. below screen shot of fiddler enter image description here

when hit url browser gives me popup window enter user name , password. how can avoid popup window?

i calling web api window service.

i suspect 2 web services may hosted on same server. in case, problem may caused loopback check. in order test, try referencing service without using qualified domain name , see if works. if does, use following steps specify host names on local computer.

method 1: specify host names (preferred method if ntlm authentication desired) (http://support.microsoft.com/kb/896861)

to specify host names mapped loopback address , can connect web sites on computer, follow these steps:

  1. set disablestrictnamechecking registry entry 1. more information how this, click following article number view article in microsoft knowledge base: 281308 connecting smb share on windows 2000-based computer or windows server 2003-based computer may not work alias name
  2. click start, click run, type regedit, , click ok.
  3. in registry editor, locate , click following registry key: hkey_local_machine\system\currentcontrolset\control\lsa\msv1_0
  4. right-click msv1_0, point new, , click multi-string value.
  5. type backconnectionhostnames, , press enter.
  6. right-click backconnectionhostnames, , click modify.
  7. in value data box, type host name or host names sites on local computer, , click ok.
  8. quit registry editor, , restart iisadmin service.

http://blogs.4ward.it/impersonation-issues-401-error-mvc-and-web-api-4-5/

**edited in form of answer , include detailed steps referenced links


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -