ASP.NET虚拟路径映射到另一个不允许的应用程序 [英] ASP.NET Virtual Path Maps To Another Application Which Is Not Allowed
问题描述
我有一个网站,在多台服务器上没有任何问题。
但是,当我在同一台机器上将其从一个文件夹复制/移动到另一个文件夹时:我开始收到错误
I have a website that was building without any issue on multiple servers.
But, when I copy/move it on the same machine from one folder to another folder: I started getting the error
虚拟路径映射到另一个不允许的应用程序。
The Virtual Path Maps To Another Application Which Is Not Allowed.
我做错了什么?
推荐答案
这个问题的根源是当一个人复制一个ASP.NET时网站到新文件夹 - 与解决方案虚拟路径关联的属性设置设置为文件夹名称而不是根目录。解决方案是将虚拟路径设置从文件夹名称更改为/\".
The source of this problem is that when one copies an ASP.NET Web Site to a new folder -- the properties setting associated with the solution "Virtual Path" is set to the folder name and not the root. The solution is to change the Virtual Path setting from the folder name to "/".
通过右键单击项目并打开属性对话框可以找到:解决方案 - >属性 - >虚拟路径 - >更改为/
This can be found by right click the project and opening the properties dialog: Solution->Properties->Virtual Path-> Change to "/"
这篇关于ASP.NET虚拟路径映射到另一个不允许的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!