简体   繁体   English

使用Web部署设置更改IIS网站文件夹

[英]Change IIS website folder using web deployment setup

我正在使用.Net 4.0中的Web部署安装程序来部署网站,它会将网站部署在C驱动器中的inetpub文件夹中,但是我担心的是,我希望使用安装程序将网站部署到其他文件夹中,是否可以部署网站到不同的位置?

Not directly during deployment. 部署期间不直接进行。 The actual location of the Web site in IIS is defined through the IIS configuration. 网站在IIS中的实际位置是通过IIS配置定义的。

To change this interactively: 交互式更改此方法:

In Windows Explorer, right-click on the "My Computer" icon, choose Manage. 在Windows资源管理器中,右键单击“我的电脑”图标,选择管理。

Expand the "Services and Application" node, select "Internet Information Services". 展开“服务和应用程序”节点,选择“ Internet信息服务”。

You should then be able to select the list of sites on your PC: 然后,您应该能够选择PC上的站点列表:

在此处输入图片说明

Click on the "Basic Settings..." button to change the location: 单击“基本设置...”按钮以更改位置:

在此处输入图片说明


You can also do this programatically through WMI, as explained here: http://blogs.msdn.com/b/helloworld/archive/2009/05/29/how-to-programmatically-modify-the-iis-virtual-directory.aspx 您也可以通过WMI以编程方式执行此操作,如下所述: http : //blogs.msdn.com/b/helloworld/archive/2009/05/29/how-to-programmatically-modify-the-iis-virtual-directory .aspx

or through MSBuild with the MSBuild Extension Pack . 或通过带有MSBuild扩展包MSBuild

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM