Help! 'Web Access Failed' when trying to create a new web project.

Last post 12-27-2003 11:21 PM by miggel. 5 replies.

Sort Posts:

  • Help! 'Web Access Failed' when trying to create a new web project.

    11-30-2002, 4:35 PM
    • Member
      115 point Member
    • emiisdev
    • Member since 06-25-2002, 9:58 AM
    • Posts 23
    Hi everyone!

    This has surely frustrated me! I FINALLY get a chance to try Visual Studio and now I am not able to create a new C# Web Project.

    Can someone explain to me WHAT Visual Studio is expecting and WHAT I should configure in IIS for them to work together?

    Here's my current setup:

    I'm using Windows 2000 Pro. (so I'm only able to create one web site on the machine) I have a couple of web projects that I'm working on that are totally isolated. Whenever I need to make some development changes, I just reconfigure the 'Home Directory' in IIS to point to the appropriate site.

    For example:

    C:\Inetpub\WebProjects\WebSite1\
    C:\Inetpub\WebProjects\WebSite2\
    C:\Inetpub\WebProjects\WebSite3\
    C:\Inetpub\WebProjects\WebSiteDotNet\

    I created the 'WebSiteDotNet' folder above thinking that would be where I would be testing the website from my first C# Web Project.

    Here's the steps I take in Visual Studio:
    File > New > Project > (select empty web project icon)

    I then see a name field which is greyed out and a location field. In the location field I see 'http://localhost/WebProject1'. Since this ISN'T where I wanted my project to be I removed the 'WebProject1' which leaves 'http://localhost/'. As soon as I did that, the 'ok' button greys out. "ok" I thought.. "Visual Studio doesn't want to create a project in the root of the the site. No big deal - I'll just live with it as a subdirectory" I then changed the location to 'http://localhost/WebSiteDotNet' and clicked 'ok'

    I am then greeted to a "Web Access Failed" Dialog box.
    "..but the project folder at 'http://localhost/WebSiteDotNet' cannot be opened with the path 'C:\Inetpub\WebProjects\WebSiteDotNet\'" also.. "Unable to create web project 'WebSiteDotNet'. The file path 'C:\Inetpub\WebProjects\WebSiteDotNet\' does not correspond to the URL 'http://localhost/WebSiteDotNet'. The two need to map to the same server location. Http error 404: object not found.

    I've then tried a bunch of different things after looking at the help files, some posts on this board. I thought I was on to something there when I created WebSiteDotNet as a virtual directory, but I received the same errror.

    I'm not sure what's going on. I'm logged in as an administer - the new folder 'WebSiteDotNet' grants access to the administrators & everyone group. (I've even tried VS developers as well)

    I feel incredibly stupid that I can't even create a project with this software. Please someone - tell me what I'm doing wrong. I see a lot of posts on this forum with similar (not quite the same) complaints. Clearly, this is not apparent to some as others might think.

    What I need to know - what should this environment be like? What does Visual Studio expect to receive. How should IIS be configured. Are there groups that I need to add to the Site folder? How about Server Extensions? I've put them on the Default Web Site in IIS - but I can't add them to the virtual folders.

    Thanks for your patience in reading this long post. I must admit that my first experience with Visual Studio .Net has not been what I would have hoped it would be.

    Sadly,

    Emi :(



  • Re: Help! 'Web Access Failed' when trying to create a new web project.

    11-30-2002, 6:42 PM
    • Member
      235 point Member
    • Palehorse
    • Member since 06-17-2002, 12:01 PM
    • Bend, Oregon
    • Posts 47
    Emi, while most of the time I create a virtual subfolder for my projects, there is a KB article that discusses how to create one in a root.

    I hope this helps!
  • Re: Help! 'Web Access Failed' when trying to create a new web project.

    11-30-2002, 7:22 PM
    • Member
      115 point Member
    • emiisdev
    • Member since 06-25-2002, 5:58 AM
    • Posts 23
    Hi,

    Thanks for the KB article. Is there a benefit from using virtual subfolders for my different projects? How will this affect root-relative links that are already in all of my existing projects? (I would prefer to continue to use root-relative links as opposed to relative links to a virtual directory if possible)

    Unfortunately, I followed the direction in the KB article and received the same exact error.
    This time, I was prompted to specify a location (the 'existing folder'). I entered in 'http://localhost' as well as 'C:\Inetpub\WebProjects\WebSiteDotNet'. (To the best of my knowledge - both of these are the SAME location) In IIS, the default website is pointed to 'C:\Inetpub\WebProjects\WebSiteDotNet'. The physical directory is 'Web Shared' as'/' and 'File Shared' as 'wwwroot$'. I made sure that my account, VS Developers and Administrator groups all have access.

    I just don't get it. While I'm sure that it's possible to create project, I must have some setting somewhere that is preventing this. Does anyone have an idea on where I can look. This is horrible. I've been trying to create this stupid project for close to 5 hours now with no luck.

    Thanks again,

    Emi
  • Re: Help! 'Web Access Failed' when trying to create a new web project.

    12-01-2002, 11:26 AM
    • Member
      235 point Member
    • Palehorse
    • Member since 06-17-2002, 12:01 PM
    • Bend, Oregon
    • Posts 47
    Well, the only advantage of using virtuals is not having to go through all of the switching when you go to work on different projects. You would have to use relative links instead of root-relative links.

    As for your problem, I'm not sure what else would cause that. Can you create a web in a virtual on your WebSiteDotNet folder and them move it up to the root? Then after you do that open it using the articles steps for opening a project in a root web?
  • Re: Help! 'Web Access Failed' when trying to create a new web project. - [SOLVED]

    12-01-2002, 10:33 PM
    • Member
      115 point Member
    • emiisdev
    • Member since 06-25-2002, 5:58 AM
    • Posts 23
    SOLVED for my situation. It may work for yours too.. Read on..

    Everyone, I've been at this for a couple of days now - and let me say that I've seen enough posts from people complaining about the SAME error (not necessarily the same cause) that you would *think* the execs at Microsoft would kick someone's a$$ and say 'solve their problem'. Microsoft - let me tell you, that you almost lost me as a customer until I stumbled onto this link: (thank you so much Gene S for taking the time to post this.)

    <http://groups.google.com/groups?dq=&hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&frame=right&th=d0310bb865a52836&seekm=2d7601c28cfb%2400187d00%2489f82ecf%40TK2MSFTNGXA01#link7>

    (I'm not going to mention how many different threads complain about the same problem here - you would think it's an EPIDEMIC)

    Here's what I've gathered from my hours of searching. Feel free to chip in and correct where I'm wrong.

    - When creating a new project Visual Studio .Net tries to match the URL and UNC path by 'writing a file with the ".tmp" extension to the server and then requesting it
    back via an http call'
    - IIS6 by default will not serve a 'tmp' file
    - IIS 5 will probably exhibit the same problem if the LockDown tool was used.
    - if logging is enabled for the site, this request will be visible: if your webserver CANNOT server a '.tmp' file you will see a '404' request code in BOTH the log and error dialog in Visual Studio .Net

    Sure enough, when I checked my logs I saw this:
    06:23:10 127.0.0.1 GET /WebSiteDotNet/~123264430429530571.tmp 404

    I followed the advice in the post above and created a new mime type called .tmp. THIS corrected the problem. I am now able to create a new Web Project/Service. Why the original programmer would create a .tmp file instead of a basic .htm file is beyond me. (especially for a web server)? That's sloppy in my opinion. Hours and hours wasted because of that decision.

    There it is. Sorry for that last rant. This SO deserves a KB article.

    Emi (grrr...)
  • Re: Help! 'Web Access Failed' when trying to create a new web project. - [SOLVED]

    12-27-2003, 10:25 PM
    • Member
      15 point Member
    • miggel
    • Member since 04-08-2003, 2:10 AM
    • Posts 3
    well thats hopefully the solution for my (exact the same) problem too. I've just spent a few days on it...
Page 1 of 1 (6 items)