Last post Jan 16, 2017 02:24 PM by dlchase
Jan 09, 2017 02:53 PM|dlchase|LINK
When I start our local intranet application using the server name then the app opens normally (e.g.
http://server/myapp). If I substitute the IP address in place of the server name (e.g. http://192.168.1.12/myapp) I get the following error on my browser. Any idea what is causing this?
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.
Jan 10, 2017 02:39 AM|Eric Du|LINK
According to your description and error message, as far as I know, permission is the main reason that caused of this error, here are some solutions to solve this type problem:
1. It seems that you do not have the IUSR_computername permission on that folder. Please refer to this link:
How to configure Web server permissions for Web content in IIS:
2. Also some one meet the similar problem as you:
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.) For me the issue was that Negotiate was above NTLM. I assume that there was some kind of handshake going on behind the scenes, but i was never really authenticated.
I moved the NTLM to the top most spot, and BAM that fixed it.
3. You also could set up in IIS to get a detailed error message, for more detail, please refer this link: IIS7 : HOW TO enable the detailed error messages for the website while browsed from for the client browsers?
Jan 10, 2017 01:55 PM|dlchase|LINK
I tried #1 and #2 but still get error. Why would it be a permission issue if the
http://server/... work ok but not the IP? It is going to the same folder.
And it may be the browser because on another PC I get prompted for credentials when I use the IP.
Jan 12, 2017 03:28 AM|Eric Du|LINK
According to your description, The IIS is a multi web site server. The way is distinct the site is by the host header name. So you need to setup that on your web site.
How To Use Host Header Names to Configure Multiple Web Sites in Internet Information Services 5.0:
Also check if you set restriction about ip access in your local computer, please refer to this link:
Block an IP or IP Range Using Windows IP Security Policy:
Jan 12, 2017 01:53 PM|dlchase|LINK
We are using server 2012R2 and IIS8.5 so this would not seem to apply.
Jan 14, 2017 04:01 PM|PatriceSc|LINK
Hi, it's old but still works the same. You can have multiple web sites on a server with a single IP address in which case the name is needed so that IIS can select the site you are trying to reach.
Double check your server side configuration but it could be that you are not reaching the same site when using the name or just the IP address.
Jan 16, 2017 01:49 PM|dlchase|LINK
I still think it is a browser issue because I can get to it using Chrome and Firefox just fine from the same PC.
Jan 16, 2017 02:13 PM|PatriceSc|LINK
Another option could be that by using the IP Address the site is no more considered as being part of the intranet zone in which case IE won't send automatically the credentials? You are using Windows authentication?
Use maybe F12 and compare what happens for the http request in both cases in particular possible authentication headers ?
Also make sure it does serve a purpose. I, just never use an IP to browse a site. Do you have to ?
If you look at the 401 substatus, it might also give some clue. The weird thing is "401 - Unauthorized: Access is denied
due to invalid credentials."
Jan 16, 2017 02:24 PM|dlchase|LINK
I added the IP address to the intranet sites on IE security tab and that seemed to do the job.