5

我正在尝试在 IIS 上部署我的 Web 服务。

但是,VS 2012 给了我一个错误,因为默认网站使用了使用 .NET Framework 2.0 的应用程序池。但是,我需要 .NET Framework 4.0 或更高版本。

因此,当我手动添加另一个 Web 服务时,我分配了支持 .NET Framework 4.0 的不同应用程序池。

我怎样才能自动化它?

我可以在扩展名为pubxml的设置文件中指定使用我想要的应用程序池吗?

我想将默认网站与不同的应用程序池一起使用,而不是使用默认应用程序池。

谢谢。

<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121. 
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>MSDeploy</WebPublishMethod>
    <SiteUrlToLaunchAfterPublish>http://localhost/Manager/ODataManager.svc</SiteUrlToLaunchAfterPublish>
    <MSDeployServiceURL>localhost</MSDeployServiceURL>
    <DeployIisAppPath>Default Web Site/Manager</DeployIisAppPath>
    <RemoteSitePhysicalPath />
    <SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
    <MSDeployPublishMethod>InProc</MSDeployPublishMethod>
    <UserName />
    <_SavePWD>False</_SavePWD>
    <PublishDatabaseSettings>
      <Objects xmlns="" />
    </PublishDatabaseSettings>
  </PropertyGroup>
</Project>
4

0 回答 0