views:

301

answers:

3

I'm building an ASP.NET 3.5 web application. When I run the project (using Visual Studio's built-in server), it needs to be able to access a network share as a virtual directory. I can't seem to find any information about how to do this.

The network resource is very large, is updated frequently, and is used by other developers and in other projects projects--not just me and mine.

I understand that I can create an IIS virtual directory to the network path once the site is deployed, but that doesn't help me while I'm debugging.

+3  A: 

You can't do this with the web development server. It's for debugging a single application, not one that depends on multiple virtual directories.

How does it reference the virtual directory mapped to the share? By redirecting to resources under that virtual directory? If so, then during debugging, could you just change the location it redirects to to be an IIS virtual directory?

John Saunders
The resources are all referenced directly. Good thought, though. I'll keep it in mind.
Bill Ayakatubby
To extend John's answer I'd recommend a (temporary) rewrite handler for all file types in the sub-folder, redirecting to the real folder in IIS; e.g. http://localhost/app/sub/foo.bar?a=b becomes http://iis-box/real-vdir/sub/foo.bar?a=b
devstuff
You can also run VS2008 as an Administrator and then use the local IIS directly.
devstuff
A: 

What do you mean by "access"? can you perhaps write code to do this for you while compiling and running from the IDE?

synhershko