web access failed when switching project path

  • Thread starter Thread starter Dennis Wheeler
  • Start date Start date
D

Dennis Wheeler

I'm trying to find a commandline solution for switching projects.

Currently I have to modify the IIS virtual directory path to the
source files, and then open the solution file in .Net to be prompted
with the "Web Access Failed" dialog, where I can then modify the path
to match my IIS settings.

Is there a registry setting or some other method of moving the
solution path without having to physically open the solution file in
the IDE?

you're welcome to cc: me directly with replys, and I'll try to post a
summary later.
 
I'm trying to find a commandline solution for switching projects.

Currently I have to modify the IIS virtual directory path to the
source files, and then open the solution file in .Net to be prompted
with the "Web Access Failed" dialog, where I can then modify the path
to match my IIS settings.

Is there a registry setting or some other method of moving the
solution path without having to physically open the solution file in
the IDE?

you're welcome to cc: me directly with replys, and I'll try to post a
summary later.

Here is some more info for what I'm trying to do and the question I'm
trying to ask:

I have 2 project source directories (many more than 2 actually, but
let's stick with the simple case):

C:\dev\project_1\webapp\
C:\dev\project_2\webapp\
(the actual web application is named the same for both projects)
so the IIS virtual directory will point to one or the other at any
given time
default web site\webapp --> c:\dev\project_1\webapp

I can automate switching IIS to point to one project or the other, but
when doing so, .net will give me a 404 error when trying to compile
the other project:
1. IIS points to project_1
2. devenv c:\dev\project_1\webapp\webapp.sln /rebuild /release
no problems so far
3. switch IIS from project_1 to project_2
4. devenv c:\dev\project_2\webapp\webapp.sln /rebuild /release
error – 404 (and no error code to the console to trap)

How can I automate switching between these projects?
 
Dennis,

If I understand your problem correctly, I believe that what you need to
do is edit the solution file directly.

Microsoft Visual Studio Solution File, Format Version 8.00
Project("{LAE06EC0-301F-11D3-BF4B-00C04F73EFBC}") = "YourSite",
"http://localhost/YourSite/YourSite.csproj",
"{A0B266FB-7136-453J-B10D-B49793976BE7}"

if you open the file with notepad, you can change the URL, and save the
file.

Hope this helps.

Regards,

Rodger
 
Rodger Brennan said:
Dennis,

If I understand your problem correctly, I believe that what you need to
do is edit the solution file directly.

Microsoft Visual Studio Solution File, Format Version 8.00
Project("{LAE06EC0-301F-11D3-BF4B-00C04F73EFBC}") = "YourSite",
"http://localhost/YourSite/YourSite.csproj",
"{A0B266FB-7136-453J-B10D-B49793976BE7}"

if you open the file with notepad, you can change the URL, and save the
file.

Hope this helps.

Regards,

Rodger

Rodger, Thanks for the response, but that's not it.

both solution files point to the same localhost/project dir

the problem is that it's a virtual dir, and since each project uses a
different set of source files, I modify the IIS properties for that
virtual dir to point to the set of source files that I need to compile

but unless I first open the solution file in the IDE (which then
prompts me that the paths don't match), then it won't build from the
command line. nor will it trip an 'if errorlevel' code.

I did just discover a binary *.csproj.cache file that gets written to
a hidden folder after I open the solution file. And it contains path
strings for the last solution file I've opened.

c:\Documents and Settings\[username]\VSWebCache\[machinename]\[project
name]\_vti_pvt\[project name].csproj.cache

it would be a shame if this file is what is tying IIS and .Net
together such that I can't automate switching commandline project
builds
 
Back
Top