在子文件夹中运行 ASP.NET 网站 [英] Run an ASP.NET website in a subfolder
问题描述
有没有办法在网站的子文件夹中运行 ASP.NET 网站?
Is there a way of running an ASP.NET website in a subfolder of the website?
举个例子,假设我想运行screwturn wiki (http://www.screwturn.eu/) 在我网站上名为wiki"的文件夹中,我是否可以更改旋风网站的 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/bin"中的~/bin"中找到它的程序集,对于新根目录下的所有其他文件夹也是如此.
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 网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!