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.


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.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
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)
btanExec ConsultantCommented:
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
bmanmike39Author Commented:
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?
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

David Johnson, CD, MVPOwnerCommented:
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.
bmanmike39Author Commented:
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?
David Johnson, CD, MVPOwnerCommented:
no as long as it can use the settings in the apphost.configthis is what controlles the apphost.config
btanExec ConsultantCommented:
if you are using asp.net, as a whole it is as below
-at server level, you have Machine.config
-at IIS level, you have ApplicationHost.config
-at Root Web level, you have Web.config (stored in the same directory as the Machine.config. At run time, this file is merged second from the top in the configuration hierarchy.)
-at Web site level, you have Web.config (for a specific Web site contains settings that apply to the Web site and inherit downward)
-at ASP.NET application root directory level, you have Web.config (for specific ASP.NET application is located in the root directory of the application and contains settings that apply to the Web application and inherit downward)
-at ASP.NET application subdirectory level, you have web.config  (for an application subdirectory contains settings that apply to this subdirectory and inherit downward)

May be worth working as ASPX instead of html.You can have Web.config. It must contain only entries for configuration items that override the settings in the Machine.config file.  In that specific folder, can have the web.config and comment authorization/allow for your specific users (as testing)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.