Virtual Directories

C

Chuck P

Using vs05 and making an asp.net 2.0 website.

We use VSS and have everything organized like this

SolutionName
Documents
Code
WebProjectName1
WebServiceProjectName1

The issue we have is that on our production website we have some
directories off of the root

\
StyleSheets
Images

All of our websites use these common Virtual Directory
In VS05 I can't figure out how to use these common directories without
importing them into the project.

That is due to the way the built in web server works.
Can you configure it to use virtual directories?
Is there some work around so that I don't have to put the shared
directories into every project? I'd like to use the VS Development
Web Server because it makes it easy to check out projects to new
computers (no local IIS virtual directory creating for the project).

I saw this article a while back:
http://delphi.about.com/od/adptips2005/qt/cassinivalidate.htm
Are there some Cassini limitations I should know about?

thanks,
 
S

Steven Cheng[MSFT]

Hi Chuck,

Thank you for posting and glad to see you again.

From your description, I understand you're using the VS 2005 FileSystem
based project to develop some ASP.NET 2.0 web applications. And you're
using VSS to manage the projects' source. These web applications will use
some shared static resources(like css styles and images in a global
location, a dir under IIS site root when hosting in IIS), however, you
found it hard to make the applications to reference these shared resource
through the VS 2005 Test WebServer, correct? If anything I didn't quite
get, please feel free to post here.

Based on my understanding, this does be an existing limitation of the VS
2005's TestServer (The WebDev.WebServer.EXE ), the testserver generally
only take care of the application's directory and sub directories, it has
no sense of parent virtual or physical dir which makes IIS site root like
setting not available.

For your scenario, except using local IIS to host the application, what I
can get so far is the following workaround:

This approach contains two steps:

1. By default, the VS 2005 TestServer will host our web application as a
sub virtual directory under site root , however, we can manually launch the
testserver and configure it as a root application:

#How to Run a Root ¡°/¡± Site with the VS/VWD 2005 Local Web Server
http://weblogs.asp.net/scottgu/archive/2005/11/21/431138.aspx

Thus, any site relative path like "/Images/...." can be correctly pointed
to our appliation directory's sub directories.

2. As in #1, we still need to copy any shared resources into the sub
directories in our application's sub directories, then, we need another way
to do the mapping between the global shared resource folder and our
application's sub folders. This is the "Symbolic link" file setting
provided in windows 2000 and above, it provide a low level physical folder
linking, and there is an utility in sysinternals site which can help us
create such symbolic linking between NTFS physical folders:

#Junction
http://www.sysinternals.com/Utilities/Junction.html

You can find more about file system's symbolic linking in MSDN:

http://msdn.microsoft.com/library/en-us/fileio/fs/symbolic_links.asp?frame=t
rue

This idea comes from an original thread discussing on provide shared
location to store source files which will be used (for compilation) in
multiple applicaitons.


Hope this helps a little.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



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

Steven Cheng[MSFT]

Hi Chuck,

How are you doing on this issue or does the information in my last reply
helps you a little? If there is anything else we can help, please feel free
to post here.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



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

Chuck P

Thanks Steven,
It's enough to make me no I don't want to go there.
I will have all the developers install IIS.

Actually vs05 seems to work much better than 03 in this regard.
A developer checked an asp.net solution into vss from her D: drive.
I checked it out to my J:. For some reason it actually worked. It
wouldn't have in VS03.

I looked at the .sln file and the project info had

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") =
"D:\CriticalSkills\Documentation\", "..\Documentation",
"{87B14359-9A80-41B2-8825-013C6BB4F49C}"
ProjectSection(WebsiteProperties) = preProject
SccProjectName =
""$/VS05/CriticalSkills/Documentation", XQDAAAAA"


I guess when it looks for the project if it doesn't find it at the
first location it tries a relative location.

Also I didn't have to create Virtual directories in IIS! I guess VS
did it automatically.
 
S

Steven Cheng[MSFT]

Thanks for your followup Chuck,

Glad to hear that you've already been on the way. As always, please feel
free to post here when there is any thing we can help on ASP.NET developing.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



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

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

Top