Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 14, 2007 11:58 PM by charliearcuri
Sep 28, 2007 09:53 AM|LINK
Im trying to put my ASP.Net application online but i just keep getting "You are not authorized to view this page" errorpage (error 401.1).
Heres what i have done:
-Placed the complied ASP.net application and its files to C:\mypage\
-Created a virtual folder in IIS 5.1 called mypage and selected correct ASP.Net version (2.0.50727)
-Directory security is set to anonymous access (using IUSR_machinename). No integrated windows logon is selected.
Now when i try to open http://localhost/mypage/ i get "You are not authorized to view this page" (the same thing happens of course when i try to connect from another PC).
I've tried to give access rights to users IUSR_computername, IWAM_computername, ASPNET and even NETWORK SERVICE to the mypage folder, but nothing seems to help!
Im out of ideas. When I did the same on my other PC (also Win XP with SP 2 and IIS 5.1, everthing worked fine).
Thanks in advance,
Sep 28, 2007 05:59 PM|LINK
Check the settings in the web.config file if it allows Anonymous access.
Oct 01, 2007 06:13 AM|LINK
I changed the authentication mode in the web.config file from "Windows" to "None", but i still get the same "You are not authorized to view this page" error page.
Here is what i have in web.config file now:
This is really weird...
Oct 01, 2007 05:18 PM|LINK
Change the mode to Integrated Windows Authentication in IIS.
And use this in Web.config
Might work out.
Oct 02, 2007 05:57 AM|LINK
Thanks for the replies, but the problem is still not solved.
When i set authentication mode to "Windows" and authorization to all users, i can access the page but only by giving my user name and password. I dont want to prompt for username and password at all, i want anonymous access...
Im getting really frustrated with this. It´s my first time hosting an ASP.Net page and i have no idea what could still be wrong. Im able to host normal HTML pages with anonymous access, but ASP.Net pages somehow just dont work.
Oct 03, 2007 07:17 AM|LINK
Wow, it seems that i cant even host normal HTML pages with anonymous access. I get the same error when trying to access just a simple HTML page through localhost.
I´ve heard that installing .Net Framework and IIS and registering ASP.Net in wrong order might cause problems. What is the correct order to install them?
Oct 03, 2007 07:45 AM|LINK
ANSWER: I got both HTML and ASP.Net page hosting working with anonymous access by unchecking "Allow IIS to control password". Im not really sure WHY it is working now, maybe the IUSR_machinename accoun´s password was out of sync or something.
Oct 03, 2007 09:30 AM|LINK
Go to Control Panel,
Click on adminisrative tools and go to Internet Information Services
Right click on default website and select properties. Click on Directory Security tab and click the edit button in Anonymous Access and authentication control section and click on Anonymous access and Allow IIS to control password.
Please remember to MARK AS ANSWER if my reply helped you,
Nov 15, 2007 02:20 PM|LINK
I'm having the same issue.
Setting IIS to Anonymous Access does not work for any kind of page.
For me, there is *no* option for "Allow IIS to control password", I wish there was since I don't know the IUSR_ machine account password.
Have been tying to set up reporting services on a 2003 server, so far nothing's worked, not even a test html page in the default web site.
Really appreciate everyone's help here, thanks gang.
Dec 14, 2007 11:58 PM|LINK
I encountered the "You are not authorized to view this page" error as well. For me the solution was to specify
WebForm1.aspx as a Default Document in IIS for the website I was trying to debug using VisualStudio 2005. Prior to WebForm1.aspx being specified as a Default Document, Internet Explorer was going to the address of the
site without WebForm1.aspx at the end of the URL and, because "directory browsing" was not enabled, IIS returned the error message. So, the 3 alternatives I found in order of desirability for me were:
1) Make WebForm1.aspx a Default Document in IIS.
2) Specify WebForm1.aspx as the Start Page in VisualStudio 2005
3) Enable directory browsing in IIS