Re: web access failed - argghh

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Chris (ripvannwinkler_at_community.nospam)
Date: 03/01/05


Date: Mon, 28 Feb 2005 22:52:48 -0500

Well, I'm still hoping someone replies, but I thought I'd list my interim
solution in case others have come across this problem:

1. Open IIS, right click on the actual site you're trying to use for
development.
2. Ensure that it is the default site by making sure it lists on all IP
addresses on port 80, and will accept any host header (this config is
default for the Default Web Site).
3. Right click the site itself and click Backup Configuration, save config
backup somewhere on your server
4. Right click the IIS root in the mmc and click Restore Configuration.
5. Browse to and select the backup you just created, select the site you're
trying to restore (should be only 1 in the backup file).
6. When prompted, choose the option to replace the existing site.

Apparently, here's what goes down:

Visual Studio .NET is picking up configuration info for whatever site was
last created, not the default web site as you might assume. Therefore, if
you create an additional site beyond the Default Web Site, and try to use
the Default Web Site for development, you'll get path errors and the "Web
access failed" dialog. By doing a backup/restore with the replace option,
you tell IIS to remove the original site and recreate the default website,
which now has a more recent site ID in the metabase. This causes VS.NET to
pick up the configuration information for the newly restored site, instead
of the previously created site. Because of this, your expected physical
path will now be correct, and VS.NET will carry on happily.

I don't like this solution, because I have to do it everytime I want to add
another virtual server, but hey it works without fail. It's also worth
noting that because you're doing a backup/restore from within IIS, all of
the virtual directory settings within the site are maintained in the
re-created version of the site, so there are no issues there.

"Microsoft" <ripvannwinkler@community.nospam> wrote in message
news:eWlRVJXHFHA.3332@TK2MSFTNGP15.phx.gbl...
> Hello all,
>

[snip]

> Now, when I try to create an ASP.NET application using
> http://localhost/appname, I get the dreaded web access failed message.
> The weird part is, the physical path it is trying to use is the physical
> root directory of the second web site (i.e. e:\web
> sites\www.someotherdomain.com). Since of course, I am specifying
> localhost, the first website, the paths are conflicting and visual studio
> .net is complaining about a valid conflict. This I understand.
>
> What I don't understand is, given that the dev.mydomain.com website is the
> only website configured to listen on 127.0.0.1 on my server, and also
> given that I am specifying localhost in the url, which cannot resolve to
> anything other than 127.0.0.1 (as specified in the hosts file), how in the
> heck is VS.NET obtaining the physical root path for the OTHER domain?
> Sure, I can make the site work if I manually type in the correct path each
> time I create a project, but I shouldn't have to, and I don't want to
> force my other developers to do so.
>
[snip]



Relevant Pages

  • Re: companyweb - Sharepoint services
    ... Start by going to the IIS Manager, Default Web Sites, Properties, and see if the IP address is set to. ... One for port 80 and host header the name of the server, and one with IP address 127.0.0.1, at port 80 with empty host header. ... That should fix the Backup and Monitoring issue. ... Make sure that the Web site address displayed in the address bar of your ...
    (microsoft.public.windows.server.sbs)
  • Re: Unable to make working backup or publish
    ... I desire to make a backup of my web site and test it on my home machine (XPPro using IIS). ... > publishing to create my backup, however, I'm unable to publish...see error message noted below. ...
    (microsoft.public.frontpage.client)
  • Re: Unable to make working backup or publish
    ... I desire to make a backup of my web site and test it on my home machine (XPPro using IIS). ... > publishing to create my backup, however, I'm unable to publish...see error message noted below. ...
    (microsoft.public.frontpage.client)
  • Re: How to programmatically change which framework a web site should use
    ... configuration from IIS by right clicking on the virtual root in question and ... you will want to programatically poke at IIS to ensure 2.0 ... Do you know how to change which framework a web site should use - ... my web server has both Framework 1.1 and 2.0. ...
    (microsoft.public.dotnet.framework)
  • Re: How to Backup IIS 5 on W2K
    ... it does not surprise me that re-doing the entire website ... > IIS configuration is stored in the IIS Metabase. ... > a) backup the current system (ensuring that you backup the Windows System ...
    (microsoft.public.inetserver.iis)