473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

web access failed - argghh

Hello all,

Here's the setup:

I've got VS.NET 2003 installed on a Windows 2003 Server. I've got multiple
sites configured as listed below using host headers:

dev.mydomain.com
ip: 127.0.0.1
host headers: dev.mydomain.com, empty (as in no value)
root directory: e:\web sites\dev.mydomain.com
root directory is shared as wwwroot$

www.someotherdomain.com
ip: my server's only external ip
hostheaders: www.someotherdomain.com, someotherdomain.com
root directory: e:\web sites\www.someotherdomain.com

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.

Any thoughts?

--
chris
Nov 19 '05 #1
3 1881
Forgive the accidental post under the name Microsoft. I had mis-read the
settings box when configuring the news account. Most humble apologies...

--
Chris
Nov 19 '05 #2
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" <ri************@community.nospam> wrote in message
news:eW**************@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]
Nov 19 '05 #3
HI Chris,

First, I shall thank you for sharing your experience on this issue with us.
As for the problem when creating asp.net web application in IIS, yes, what
you've found is correct, the VS.NET dosn't really locate the file shared
path from the sitename you specified in the http url, but from some cached
storage which contains the site path that is previously used. And this is
the existing problem when we creating web site through fileshare mode(the
default mode).

Also, when using host headers, it is recommended that we avoid using the
"localhost" as the site name, but use the host header names. And instead of
using File share mode, we can use the PFSE mode which will no longer look
for any shared folder but directly locate the path from the http url
address we specify at the begining.

In addition, in VS.NET2005, ASPNET2, the new "Projectless" asp.net
development feature may greatly improve the asp.net web application
development. We'll no longer need to struggle with the web applicaiton
project file and we can create a web application directly on a normal
filesytem folder rather than IIS vdir.

Thanks again for your posting.
Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: *no spam* | last post by:
I want to move my Access 2K database into MSDE. The Access Upsizing Wizard crashes (a known bug wi A2K), so I'm using the following suggested method: Access --> New --> Project (Existing...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
10
by: Shawn | last post by:
JIT Debugging failed with the following error: Access is denied. JIT Debugging was initiated by the following account 'PLISKEN\ASPNET' I get this messag in a dialog window when I try to open an...
1
by: Rachel | last post by:
I have created a simple web service in VC# that adds two numbers. It returns an integer value to the client once invoked. I used Visual Studio .NET 2003, Windows XP Pro and .NET 1.1. I created a...
1
by: Yanping Zhang | last post by:
Here are more details about my codes, please help! The function declared in C: typedef void (WINAPI *PLEARNCALLBACKPROC) (unsigned int progress, unsigned int sigQuality, unsigned long...
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
1
by: lactaseman | last post by:
While I know this is not the correct venue... I realize this is of little to no importance to most out there... however, if I had found this in my initial searches, I would have used this. So, as...
2
by: John | last post by:
Hi I am getting the below error while trying to run app. What is the problem and how can I fix it? Thanks Regards
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.