4
votes

I am developing a web api. When I ran web api in local workstation by Visual Studio and used Fiddler or IE to consume it, all things were fine.
But if I deployed it into a remote IIS server, I get 401 error code in IE, Fiddler or client application. Even I enable Anonymous Authentication in IIS, 401 still occurs.
Could anyone give me some suggestions?
Thanks.

1
DO you have disabled all other authentication? Try disabling all other authentication except Anonymous for the Website/WebApplication in IIS.Pranav Singh
401 still occurs even all other authentication disabled.KyL
What authentication(s) is the server's WWW-Authenticate response header actually asking for?Remy Lebeau
I don't set WWW-Authenticate anything.KyL
Your webApp has Application User(pass through authentication) or Specific User? Make your IIS is able to access physical location & that is never shared to anybody, this sometimes causes problems...Pranav Singh

1 Answers

1
votes

You can right click in the Authentification the "Anonymous Authentification" and select Edit. From there, you can assign on which credential you run the Anonymous authentification. If you set your own account, it should work (or any account that can run the web api).