Link to home
Start Free TrialLog in
Avatar of bmanmike39
bmanmike39

asked on

401 Site Error on new Azure Win 2012 server. need help to identify problem

I receiving the following error when I Try to view my web site on my Azure win 2012 server.  Note, I have one site running, and it works fine, and I am using the same IP for both. But I can't get the second one running.

I have done the following:
Given read, write permissions to the directory and  IIS_IUSER  and Network services.
set the headers and application pool and set the ports to 80.

The file are in the directory but will not show.  I have a simple index.html file but still get 404

Thanks for any help in advance.

Error:
401

401 - Unauthorized: Access is denied due to invalid credentials.
You do not have permission to view this directory or page using the credentials that you supplied.

Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

on the site in question in iis you have to change the authentication to 'anonymous Authentication' and authorization to 'allow all users'
remember each site must have one of the following items to be unique
ip address/port/host name

a 401 error (authentication failure) is not a 404 (not found error)
Avatar of btan
btan

Can check that NTLM is done as priority e.g.
1.) Open iis and select the website that is causing the 401
2.) Open the "Authentication" property under the "IIS" header
3.) Click the "Windows Authentication" item and click "Providers"
4.) Have NTLM above the Negotiate .

Next, if you have the anonymous access to use specific credentials in the applicationHost.config file of IIS. Then configure the application pool running the virtual directory to use the same credentials configured for anonymous access e.g. in the virtual directory, open up the Authentication, and edit the Anonymous access credentials accordingly. That include full rights to IUSR as mentioned by David
Avatar of bmanmike39

ASKER

I had already done this. I was finally able to get it to work.  I think it was that there was no web config file in the directory. but i was using an html file, not a aspx file. On IIS is a webconfig file necessary regardless of file type?
the initial setting is the apphost.config a web.config inherits the apphost.config settings and can be used to customize the web site settings.
So when I setup a new site on the server, does the root have to have a webconfig file in it, Or will this produce an error?
no as long as it can use the settings in the apphost.configUser generated image
ASKER CERTIFIED SOLUTION
Avatar of btan
btan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial