Problems when the project folder is not under Inetpub\wwwrot

S

Stan

My project folder path is c:\Projects\FinWeb. I set up FinWeb virtual folder
in IIS and pointed it to that path. I can access the web site via
http://localhost/FinWeb.

However, when I try to add FinWeb web project to a solution by using Add
Existing Project from Web, the project isn't there (not under localhost). I
can point to c:\projects\FinWeb and add the project this way and everything
works fine, but when the solution is opened again, VS.NET cannot find
http://localhost/FinWeb/FinWeb.csprj file. So I have to go to the physical
page again..

It appears that VS.Net uses localhost web folder and this web folder does
not have FinWeb. It looks like web folder ignores virtual folders? I am not
quite sure why it happens...

Thanks,

-Stan
 
S

Steven Cheng[MSFT]

Hi Stan,

From your description, you create a virtual folder with a specified
physical path(other than the wwwroot path), and host a web application in
it. Then, when you try use "add existing proejct from web" in VS.NET , you
need to manually speicify the .csproj file to add it to a solution. Also,
when you close and open the solution again, you'll encounter "VS.NET cannot
find http://localhost/FinWeb/FinWeb.csprj file" error, yes?

What's the OS version and IIS version / vs.net VERSION on your machine?
Regarding on your description, I've also done some tests on my side:

I done the following test on both Win XP Pro and Win2k server machine:
1.create a vritual folder under the default site and point its home
directory to a physical folder(not under wwwroot).

2.Deploy an asp.net web project in the virutal folder created in #1
(Modified the project's .csproj.webinfo file so that it can be correctly
opened in vs.net)

3. Open a certain .net solution and use the "Add Existing project from web"
and specify the project's web path , yes, the csproj file not display in
the folder and I manually browse to the directory and select it. After add
it into solution, it can work well.

4. Close the soluton and open again, the web project can still be opened
correctly without error.

So the different result between our tests are the #4 ,yes? Are you sure
that you can directly open the single Webproject in VS.NET by clicking its
.csproj file? Is the "Web UrlPath" info in the .csproj.webinfo file
specified to the correct thing? Also, you can manually open the .sln file
via notepad to see whether the webproject's info are set as the correct
value.

In addition, have you tried create a new solution and add the web project
and close/open again to see whether the problem occur?

If you have any other findings, please also feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

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

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top