Anonymous Authentication <anonymousAuthentication> / 403 - Forbidden: Access is denied
Replace <security> </security>
in your applicationHost.config with
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
You should be able to configure the same from IIS Manager as well using link
Related videos on Youtube
tugberk
Updated on September 18, 2022Comments
-
tugberk over 1 year
I am using windows server 2008 R2 and IIS 7.5
I deployed my app to that server for the first time and I got the following error;
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.
so I make a little search on that and I figured that I should configure Anonymous Authentication
<anonymousAuthentication>
but I don't know how to do that. It is clearly explained on the following link but not sure if this is the right solution to my problem;http://www.iis.net/ConfigReference/system.webServer/security/authentication/anonymousAuthentication
if this is the problem, I guess, I should put a similar code block as follows;
<security> <authentication> <anonymousAuthentication userName="User1" password="[enc:AesProvider:57686f6120447564652c2049495320526f636b73:enc]" /> </authentication> </security>
if this is the case, how should I provide this code?
should I use AppCmd.exe with powershell?
EDIT ok, I continue to explore and new questions pops up on my head;
- As far as I got, I need to set machine username and password there. but what kind of user should I set there? where should user have access (which folders)?
- can I add that configuration inside my web.config file or should I provide this inside applicationHost.config?
-
tugberk almost 13 yearsthen, our website will be reachable right? is there any downsides of this. I talked to our server guy and he couldn't figure out this problem either. but it looks not so much complex. am I right? thanks for the answer btw.