简体   繁体   English

通过.NET代码在IIS的默认网站中更改本地路径

[英]Changing local path in the default website of IIS through .NET code

我想以编程方式从C#代码更改IIS中默认网站的“主目录”选项卡中的“本地路径”。

There are managed APIs to deal with IIS, see John's asnwer here: IIS API - Create virtual directories? 有用于处理IIS的托管API,请参见John的回答: IIS API-创建虚拟目录? for an example and also here: Creating a new website programmatically on IIS using ASP.NET and C# the body of the method: CreateWebsite. 作为示例,也可以在此处: 使用ASP.NET和C#在IIS上以编程方式创建新网站 ,方法的主体:CreateWebsite。

both are examples and should be adapted but a good starting point to show you how to interact with IIS from .NET / C# 两者都是示例,应该进行改编,但这是一个很好的起点,向您展示如何从.NET / C#与IIS进行交互

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

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