Deploying a .Net 4.5 website to an IIS 7.5 server

前端 未结 5 892
野性不改
野性不改 2020-12-30 12:29

We are using Teamcity to do continuous integration builds for our website and have just upgraded our website to .Net 4.5RC. The application builds and runs in IIS express o

相关标签:
5条回答
  • 2020-12-30 12:55

    I had a similar problem. I was building my application by calling MSBuild, and I found that when I tried to web-deploy the application I got that error. I fixed it by telling MSBuild to build with VS2012, by adding a commandline switch to the MSBuild command:

    /P:VisualStudioVersion=11.0
    

    Tip o' the hat to this question.

    0 讨论(0)
  • 2020-12-30 12:55

    It turns out that it is a TeamCity problem. When we push the update directly to the site from Visual Studio 2012 RC it works fine. We have had to change the build runner in TeamCity to a command line runner that calls the WebDeploy 3.0 of VS 2012.

    0 讨论(0)
  • 2020-12-30 13:00

    origin: http://forums.iis.net/t/1164093.aspx/1

    says: "double click on application pool and then changed .Net Framework Version"

    0 讨论(0)
  • 2020-12-30 13:00

    I was facing the same issue even after using /P:VisualStudioVersion=11.0 as well as ignore managedruntime version in the proj file.

    Run the command

    C:\Windows\System32\inetsrv>appcmd set apppool /apppool.name: DefaultAppPool /managedRuntimeVersion:v4.5 
    

    After this, reset the ISS.

    0 讨论(0)
  • 2020-12-30 13:07

    OK - fair enough. You need to use IIS 7.5, you need to target .Net 4.5 ... and they should be mutually compatible.

    Check out this link; look for "Aspnet_regiis.exe":

    http://msdn.microsoft.com/en-us/library/ee942158.aspx

    'Hope that helps .. PSM

    PS:

    These links may (or may not) also be useful:

    • http://learn.iis.net/page.aspx/624/application-pool-identities/

    • http://forums.iis.net/t/1189758.aspx

    • http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx

    Please post back what you find.

    0 讨论(0)
提交回复
热议问题