Error: HTTP 401.1 You are not authorized to view this page
I have IIS installed and running on my XP pro machine. When I go to http://localhost I get this error. These are the things I have researched and done:
index.html exists in inetpub/wwwroot, I created test.html adn could open and view that in I.E. (using version 6), but when I go to http://localhost/test.hml I get the same error message.
1). I went to http://support.microsoft.com/default...b;en-us;896861 and created DisableLoopbackCheck registry value, as well as BackConnectionHostNames reg value, with "localhost" as host name.
2). http://vbcity.com/forums/topic.asp?tid=127381 went under default website settings in IIS and checked "Allow ISS to control...", "integrated Windows Auth." was already unchecked.
3). http://support.microsoft.com/?kbid=322822, Use HTTP 1.1 through proxy connections setting is unchecked (wasn't before).
Everything else that I seem to find point to these 3 solutions, does anyone else have any ideas?
specs: Working on my own machine with IIS 5.1 XP Professional. This is whant my Web Site folder looks like -
- Default Web Site
oh, the joys of IIS permissions
i could speculate on the reasons that your permissions arent flowing, but it is likely that the actual NTFS permissions arent flowing to the index file.
right click > properties > security tab
does it have the user "IUSR_YOURCOMPUTERNAME" listed with at least read access to the file? (this is the account that windows uses if you tell it to use anonymous access)
always remember that IIS sits on top of NTFS, and no matter how you configure access in IIS, all that will be trumped by NTFS. you can have complete open access to anonymous IIS users to a file in your web site. but if the file's ACL doesnt list the IIS account (or give the account certain permissions like read/write/execute), then the web server will get shut out by NTFS.
also, if you moved this file from any location outside wwwroot into wwwroot, it probably didnt inherit the wwwroot folders permissions (which IIS sets up so things in there work). if this is the case, right click wwwroot, click properties, security, and the advanced button. click the unchecked box that says "replace permission entries...". when you do windows will advise that its not going to APPEND anything -- its going to first wipe all permissions and then replace all permissions. since this is a fresh install of IIS, you havent changed anything, and every folder/file in wwwroot is already inhereting the permissions IIS initially set, so nothing will be hurt by this replace.
once you do this, your index file (and all others) will receive the NTFS permissinos that will probably coincide with the IIS permissions, which will then give you access.
you dont have to do that method either. if you want, just right click your file and tell it to inherit the parent permissions. this should work for you as well.
if your problems persist, id blow away the IIS installation, and start over completely w/o messing with any of the registry and other entries you messed with. its easier to learn things from the point where everything began rather than after messing with stuff like you mentioned.
mostly this post assumes your website is set up for anonymous access. when it is, it uses that iusr account for that access. windows of course controls the password for that account, but the account has to be listed on every resource's ACL. IIS doesnt make this happen in any way, except with the initial install and through inhereted permissions. you could make a folder on your dekstop part of your IIS structure. that doesnt mean by default anyone can access that folder though.
IIS isnt so bad when you figure out the permission flow. heck, i learned the ins and outs of IIS from screwing with it on my xp pro machine just like you. i was able to translate that knowledge into doing many good things on an air force network i was an admin at.... especially considering there was NO formal training!!
Last edited by Angry Black Man; 12-11-2007 at 07:34 PM.
A few days ago I did uninstall/reinstall IIS. Today I started with index.htm and tracked back to C: and checked Security Groups and User Names. IUSR_COMPUTERNAME was given full rights on index.htm and wwwroot. However it wasn't even listed on Inetpub. I did this with my last install of IIS and had the same problem. When I typed in IUSR_COMPUTERNAME and hit "check names" it isn't able to find it. However this time I just clicked "Add" and it did (along with Inernet Guest Account infront of it). Unfortuanly I'm still getting the 401.1
Thanks for all of your help aaron, it was very informative. I have recieved another/better machine that I am currently moving to now. I am also frequently checking that localhost works between program installs. =)
My guess, is that the problem originats from someone else insalling xp and naming this machine under themselves. WHen I got here a few months ago it was just handed to me without a wipe and reinstall. So I don't know what the admin password is on this machine and when setting up the anny. user in IIS it's under this computers name and it has a default password but I don't konw what it is adn it might not even be the right one.
thanks again for your help.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)