0

Is there a way in a simple asp.net application to make

a subpath of / located in c:/app Map a virtual path /app/areas/1 map to D:/areas/1

Without telling iis at an application level(ie configuring iis)?

Either a programmatic/mvc or web.config solution.

4

1 回答 1

0

最简单的方法是创建一个虚拟目录:

http://www.iis.net/configreference/system.applicationhost/sites/site/application/virtualdirectory

但是如果由于某种原因你被阻止这样做,你可以看看创建一个 VirtualPathProvider,虽然这可能是矫枉过正:

http://support.microsoft.com/kb/910441

于 2013-09-07T09:37:56.360 回答