如果你的网站使用了Spring.net 1.3.2,并部署在IIS的虚拟目录上,那么将会出现如下错误:
The virtual path '/currentcontext.dummy' maps to another application, which is not allowed
以下是国外的同行对个问题的解释:
A workaround is to name your Spring application context as your virtual directory. For instance, with a virtual directory named pubprep
, you should have:
解决办法如下:
在spring的配置结点上加如下代码:
<spring> <context name="XXXXX" type="Spring.Context.Support.WebApplicationContext, Spring.Web"> <!-- ... --> </context> </spring>
其中XXXXX是你网站部署所在的虚拟目录的名字。
最后附上外国同行的链接:
http://blog.idm.fr/2009/07/web-application-with-springnet-in-a-virtual-directory-in-iis.html