Create an application pool that uses .NET 4.0

前端 未结 3 892
轮回少年
轮回少年 2021-02-01 17:43

I use the following code to create a app pool:

var metabasePath = string.Format(@\"IIS://{0}/W3SVC/AppPools\", serverName);
DirectoryEntry newpool;
DirectoryEntr         


        
3条回答
  •  走了就别回头了
    2021-02-01 18:33

    The other answers are better in your particular scenario, but in general keep in mind that you can use the appcmd tool to do this: https://technet.microsoft.com/en-us/library/cc731784%28v=ws.10%29.aspx. Specifically:

    appcmd add apppool /name: string /managedRuntimeVersion: string /managedPipelineMode: Integrated | Classic

提交回复
热议问题