5

I'm trying to deploy my web service on IIS.

However, VS 2012 gives me an error because the Default Web Site uses the application pool that uses .NET Framework 2.0. However, mine needs .NET Framework 4.0 or later.

So when I manually add another web service I assigned the different application pool that supports .NET Framework 4.0.

How can I automate it?

Can I specify to use the application pool that I want in the setting file whose extension is pubxml.

I want to use the Default Web Site with the different application pool instead of using the default application pool.

Thanks.

<?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>
Rick
  • 258
  • 1
  • 16
  • Any new thoughts on this? I, too, was wondering if there is a way to specify which app pool to publish to. – Rod May 28 '15 at 17:59
  • Answered in http://stackoverflow.com/questions/15774122/how-do-i-target-an-already-existing- application-pool-with-webdeploy – Rick Jan 11 '16 at 18:30
  • Does this answer your question? [How do I target an already existing application pool with webdeploy?](https://stackoverflow.com/questions/15774122/how-do-i-target-an-already-existing-application-pool-with-webdeploy) – asynts Mar 12 '20 at 10:42
  • @asynts I would consider that a workaround only usable for build automation. It does not use the pubxml file and cannot be used with Visual Studio's Publish wizard. Even with that solution, I see no way to configure an application pool with the correct settings. – Louis Somers Dec 08 '21 at 14:56

0 Answers0