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
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:
- 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
- click start, click run, type regedit, , click ok.
- in registry editor, locate , click following registry key: hkey_local_machine\system\currentcontrolset\control\lsa\msv1_0
- right-click msv1_0, point new, , click multi-string value.
- type backconnectionhostnames, , press enter.
- right-click backconnectionhostnames, , click modify.
- in value data box, type host name or host names sites on local computer, , click ok.
- 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
Post a Comment