Udostępnij za pośrednictwem


"403 Access Forbidden" when attempting to create an ASP.NET web project

A few weeks ago I had one of those days...

I hosed my development environment, so that every time I attempted to create a new ASP.NET web application in VS.NET 2003, I would get the following error message:   The Web server reported the following error when attempting to create or open the Web project located at the following URL: 'https://localhost/WebApplication1'.  'HTTP/1.1 403 Access Forbidden'.

I could create a web project in VS.NET 2002 without any problem (on the same machine).  Another fun note was that if I created the virtual directory first in IIS manager, and create a project in VS 2003 pointing to that vdir it would work.

I looked through the MSDN docs, through the news groups, etc., but couldn't find a way to resolve the issue.

Turns out that I had somehow set my default web site’s Home Directory > Execute Permissions to None.  Once I changed it back to Scripts only, bingo.  VS.NET 2003 was happy.

So if you get a 403 Access Forbidden error message when attempting to create an ASP.NET web app in VS 2003, take a look at your execute permissions...

bliz

Comments

  • Anonymous
    August 18, 2003
    Thanks for advise, it helped !!!
  • Anonymous
    August 18, 2003
    Cool! Makes my day!
  • Anonymous
    September 02, 2003
    VS 2003 must make the permissions change during the install(?). I wated 3 hours trying to fix this. Thanks!
  • Anonymous
    September 16, 2003
    This works great. THANKS! (PS jmatter...just change the permissions now...it works)
  • Anonymous
    September 22, 2003
    The comment has been removed
  • Anonymous
    September 25, 2003
    The comment has been removed
  • Anonymous
    September 25, 2003
    Gogo: glad you were able to get it working! -- bliz
  • Anonymous
    October 05, 2003
    THANK YOU!!! IT IS SO SIMPLE BUT IT WASTED SO MUCH OF MY TIME UNTIL I FOUND YOUR POST. YOU SAVED ME FROM REINSTALLING EVERYTHING FROM SCRATCH.
  • Anonymous
    October 19, 2003
    Thank u.
  • Anonymous
    November 04, 2003
    excellent! I had the same issue, thanks
  • Anonymous
    November 11, 2003
    Hi Denisse, did you follow the steps I took above? If you're having the same problem, that should fix it. If it doesn't fix it, I'd recommend that you post the details of your problem to the newsgroup: microsoft.public.dotnet.framework.aspnet OR microsoft.public.vsnet.ide.

    Hope this helps,
    - bliz
  • Anonymous
    November 18, 2003
    Thanks for this post. it helped and saved my time to figure out the problem. I got this problem when i tried to impersonate stuff in machine config file and iis locked my a/c and reset some of other stuff too. I suggest somebody should post such simple answers to our common everyday problems involving VS. perhaps Microsoft should have a site dedicated to such problems.
    thanks anyway
  • Anonymous
    November 19, 2003
    Thanks for the help!
  • Anonymous
    December 02, 2003
    The comment has been removed
  • Anonymous
    December 04, 2003
    Tony: glad you were able to get it working.

    Farahmand: glad it help.
  • Anonymous
    December 04, 2003
    Thank you :D
  • Anonymous
    December 08, 2003
    The comment has been removed
  • Anonymous
    December 09, 2003
    Sam,

    It could be a number of things. I'd recommend you do a search from msdn.microsoft.com, using the keywords "a connection with the server could not be established visual studio .net create project" or something to that effect.

    Hope this helps,
    bliz
  • Anonymous
    December 12, 2003
    Thank you. Solved it for me.-Ashu

    I changed my application to use https and installed a server certificate. Source safe could not connect to the IIS server to download the latest version of the code. Maybe this might solve that problem as well.
  • Anonymous
    December 21, 2003
    Each time when I try to create a new ASP.NET web application in VS.NET 2003, I would get the following error message:

    The web server reporting the following error when attempting to create or open the web project located at the following URL:'http://localhost/vb/WebApplication1'.'HTTP/1.1 500 server error'

    I looked through the MSDN docs, through the news groups, etc., but couldn't find a way to resolve the issue.



  • Anonymous
    December 22, 2003
    Hi May,

    Hmmm. You could try repairing your VS .NET installation. Run the VS .Net setup and choose repair.

    Hope this helps... -- bliz
  • Anonymous
    January 02, 2004
    I had this same problem. But my root cause was that I had set the server to run on port 8080. I had another machine running an apache server on port 80, so I wanted my windows machine to run on a different port. I guess that didn't work out so well when trying to setup a project.

    Anyone know a solution for this?
  • Anonymous
    January 05, 2004
    my problem is :The web was created successfully, but an error occurred when trying to configure the application root for this web. Web projects may not operate correctly without an application root. The returned error was: Active Directory services can not find the web server. A possible cause for this is an incompatibility between versions of Internet Information Server (IIS) on the client and the server. The usual cause for this error is creating web projects on a Windows 2000 or newer server from a Windows NT 4.0 client. You can manually configure the application root using the Internet Services Manager.
    same as tony's. I already tried changing it to scripts and executables but still get the same error message.... one thing i observed though, when my network cable is plugged, i get the error otherwise it is working well, still puzzles me how can it be happening when i am trying to create a web application in the localhost and do not connect to other computers in the network. i just connect to the network to access internet. please help me. thanks.
  • Anonymous
    January 12, 2004
    The comment has been removed
  • Anonymous
    January 14, 2004
    pinky: try changing the location of the webservice (when you create it) from http://localhost/[webservicename] to http://127.0.0.1/[webservicename] or whatever ip address / name you specified the server to run on.
  • Anonymous
    January 14, 2004
    What also helps this problem and the 500 Server Error problem is to run aspnet_regiis with the -i flag. this file should ne in the C:WinntMicrosoft.NETFramework<version> location. then you just run aspnet_regiis -i.

    -Drakier
  • Anonymous
    January 22, 2004
    And thank you again. I was about to go mad here.
  • Anonymous
    January 29, 2004
    I'm having the problem with a solution that I've been working with for a couple of weeks now. It worked fine up until today and I don't know what changed to make this happen. I've checked into everything that was suggested here. All of the settings are as they should be, but I still can't get the project (actually projects, there's 4 in the solution I'm working with). I've run aspnet_regiis -i, that didn't help either.

    Any more suggestions? I'm running WinXP Pro, IIS 5, IE 6, and I have both VS.NET 2003 and VS.NET 2002 on my machine and the problem occurs in both. I can't open any of the web projects that are on my machine.
  • Anonymous
    January 29, 2004
    mwhalen: Your best bet would be to post this type of question on one of the newsgroups, such as microsoft.public.dotnet.framework.aspnet. The newsgroups have experts in the particular area, and should be able to get you an accurate answer.
  • Anonymous
    February 05, 2004
    Thank you, thank you, thank you.... did everything listed above, but kept getting same error. Final thing that worked was changing from http://localhost/webapp1 to http://192.168.1.10/webapp1 (my server IP on LAN). Even changing to 127.0.0.1 didn't work, any ideas why? ... it was working a few days ago, but I did run some security wizard that obviously locked things down too far.
  • Anonymous
    February 06, 2004
    Because I'm french, I say MERCI BEAUCOUP !
  • Anonymous
    February 13, 2004
    Brilliant!

    Im using VS.NET 2003, IIS 5, and XP SP1 and setting permissions on default web site to Scripts fixed this problem.

    Cheers
    Al
  • Anonymous
    February 13, 2004
    Cool... 3 hours, and i find your response! Thanx
  • Anonymous
    February 25, 2004
    I had the same symptoms as the problem you have experienced, however, my settings were already set to Scripts Only. After re-installing IIS and running aspnet_regiis I still had the problem. I was only able to fix it by changing the anonymous user of the Default Web Site to a more privelaged user than the default. Thought I'd post my findings here, as this blog appears top when searching for the answer.

    Cheers,

    Dean
  • Anonymous
    February 26, 2004
    The comment has been removed
  • Anonymous
    March 03, 2004
    "403 Access Forbidden" when attempting to create an ASP.NET web project
  • Anonymous
    March 05, 2004
    Maybe a tip. I had tryed tips above. They did not work. The problem was i used SSL. I turned it off en now it works.

    B.Z
  • Anonymous
    March 08, 2004
    Thanks this helped!!!!!!!!!!
  • Anonymous
    March 27, 2004
    YOU ARE A LIFE/TIME SAVER. thanks for sharing your information!!!!!
  • Anonymous
    March 28, 2004
    cheers
  • Anonymous
    April 02, 2004
    My setting were correct and it still failed. I restarted IIS and that fixed it.
  • Anonymous
    April 11, 2004
    Bliz,

    ur suggestions helped but i also had to check the Read & Write under Home Directory in IIS as they were unchecked for some reason. Also used Microsoft KB for the same.

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;160754

    Keep the good work

    - Vandan
  • Anonymous
    April 12, 2004
    i got an error in web access through IIS service in windows XP kindly give me solution on hardik_sis@yahoo.com
  • Anonymous
    April 19, 2004
    I was getting this problem, but only when IE was set up to go via a proxy server. I found that somehow all the settings in Tools | Connections | LAN Settings | Advanced | Do not use proxy server for addresses beginning with: had been removed. Putting back "localhost" here fixed the problem.
  • Anonymous
    April 19, 2004
    PG: good info! Thanks for sharing!
  • Anonymous
    April 29, 2004
    I also had 403 error but my cause was different:

    the installer put the default page (IIS>defaul page>yoursite -> property's -> documents tab)
    to default.aspx instead of my project's start page

    chnaging this to the correct start page fixed the problem
  • Anonymous
    May 06, 2004
    Thanks, it works very well

    I cannot understand why this help cannot be found on microsoft websites...
  • Anonymous
    May 12, 2004
    The comment has been removed
  • Anonymous
    May 13, 2004
    Try this:

    Using IIS, create a virtual directory. Create a simple ASPX page. Try to open the page in Internet Explorer. If you still get a 500 error, turn off friendly HTTP error messages in Internet Explorer (Tools | Options | Advanced. Uncheck "Show friendly HTTP error messages.")

    If that doesn't shed some light, I'd Google on the terms 500 Server Error Visual Studio .NET.

    Hope this helps.
  • Anonymous
    May 17, 2004
    yet another "thank you"!
  • Anonymous
    May 29, 2004
    god bless ya
  • Anonymous
    May 30, 2004
    It really works
  • Anonymous
    June 12, 2004
    The comment has been removed
  • Anonymous
    June 13, 2004
    Hi

    I've been getting the same HTTP/1.1 500 error when i tried to create a new project.

    Could it be to do with the fact that i installed php for iis ???

    James
  • Anonymous
    June 13, 2004
    wheeeewwwww! thanks a lot!
  • Anonymous
    June 14, 2004
    > Could it be to do with the fact that i installed php for iis?

    I'm not familiar with PHP or what it does during the installation. You may want to Google for that.
  • Anonymous
    June 14, 2004
    > Try turning your personal firewall completely off.

    You may want to try that just to see if it gets rid of the 500 error. But I wouldn't run that way for long, and you probably should disconnect from the network to be safe from intruders while you do it. (My 2 cents.)

    There's probably some other root cause than the personal firewall.
  • Anonymous
    June 14, 2004
    no firewall mate
    that's the thing, i really don't get why this happens.
  • Anonymous
    June 14, 2004
    it would be really interesting if someone could explain how visual studio actually attempts to create a virtual directory in the root folder when a new project is created. That might help us pin point some strange errors.
  • Anonymous
    June 22, 2004
    I have the same error when I try to reopen the VS.NET project. We developed the project without SSL and then we configured the website to use SSL. After doing that when we try to open the project in VS.NET it gives Access Forbidden error. Website directory properties has scripts only. What will be the problem?
  • Anonymous
    June 29, 2004
    Thanks it helped
  • Anonymous
    June 29, 2004
    The comment has been removed
  • Anonymous
    June 30, 2004
    This works great. THANKS!
  • Anonymous
    July 07, 2004
    The comment has been removed
  • Anonymous
    July 13, 2004
    Thanks , you make my day
  • Anonymous
    August 03, 2004
    My solution:

    Check if default.aspx is set as default page. If not, IIS tries to browse directory, which usually doesn't have permission.

    Adding default.aspx as default page solved for me
  • Anonymous
    August 03, 2004
    I created a Web Application in Visual Studio .NET. I can access an aspx page from a .NET program (C#) successfully, but when I try accessing it using WinHttp, I get the 403 error. Any idea about which library I should be using to access an aspx page through VB?
  • Anonymous
    August 03, 2004
    I forgot to mention - I tried changing the permissions as described above, changed the URL from localhost to the actual IP address (I'm trying it from my own machine), but nothing seems to work. My development m/c is Windows XP
  • Anonymous
    September 08, 2008
    PingBack from http://chinlock.blog.friendster.com/2005/08/help-help-403-error/