问题描述
有没有在网站的子文件夹中运行ASP.NET网站的方法?
Is there a way of running an ASP.NET website in a subfolder of the website?
例如,我想运行螺旋式wiki a href =http://www.screwturn.eu/ =nofollow noreferrer> http://www.screwturn.eu/ )在我的网站上名为wiki的文件夹中,我可以修改screwturn网站的web.config,告诉它它正在wiki文件夹中运行? (比如说〜/=/ wiki /)
As an example, say I wanted to run the screwturn wiki (http://www.screwturn.eu/) in a folder called "wiki" on my website, can I alter the web.config of the screwturn website to tell it that it is running in the "wiki" folder? (like saying that "~/" = "/wiki/")
然后,wiki会在/ wiki /
The wiki would then find its assemblies that are in "~/bin" in "/wiki/bin" and the same for all other folders below the new root.
推荐答案
蛋糕,你可以添加一个虚拟目录到IIS网站的根目录,并将其指向您的网站的路径或将其设置为网站根目录中的物理目录,然后通过在IIS管理控制台中右键单击它将其转换为应用程序,转到属性并单击应用程序名称旁边的创建。
Piece of cake, you can either add a virtual directory to the root of the IIS website and point it at the path of your site or place it an a physical directory in the website root then turn it into an application by right-clicking on it in the IIS management console, going to properties and clicking "Create" next to application name.
这篇关于在子文件夹中运行ASP.NET网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!