Deploying .NET 4.5 web app with Web Deploy - asp.net

I have a working ASP.NET MVC 3 application. The project is built with VS 2010 and targets .NET 4.0. Now I re-targeted it to .NET 4.5 and successfully recompiled. Trying to deploy it to our test server (Windows 2008 R2 SP1) now fails:
Error Code: ERROR_APPPOOL_VERSION_MISMATCH
More Information: The application pool that you are trying to use
has the 'managedRuntimeVersion' property set to 'v4.0'.
This application requires 'v4.5'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_APPPOOL_VERSION_MISMATCH.
The server has .NET 4.5 installed but there is no app pool 4.5 (because it's inplace upgrade and as I understand 4.0 pool should be fine). The client machine has VS 2012 and so Web Deploy 3 (was Web Deploy 2 previously). I also installed Web Deploy 3 to the server.
Tried to re-register ASP.NET with aspnet_regiis - no luck.
Why do I get the error and how can I fix it? This is so frustrating...
p.s.
Found similar question about RC but it does not help
Update:
Looks like this is a bug Microsoft hasn't fixed since CTP. IgnoreDeployManagedRuntimeVersion property did the trick. What a shame!

You can try adding this property to the project:
<IgnoreDeployManagedRuntimeVersion>True</IgnoreDeployManagedRuntimeVersion>

Windows Server 2012 includes .NET 4.5 by default and (when Web server role added) IIS has the following app pools: DefaultAppPool, .NET v4.5, .NET v4.5 Classic that use .NET Framework 4.0 (because 4.5 is inplace upgrade of 4.0). However, if we install .NET 4.5 redistributable on Windows Server 2008 that has .NET 4.0 installed the pools are not renamed: ASP.NET v4.0, ASP.NET v4.0 Classic. And this is the key why Web Deploy fails.

#kzu: not trying, this will work.
Had the same problem when installing Orchard CMS. Keep targeting v2.0.
But find the simple solution: in IIS, on the Application Pools (the list with all application pools), you can find the 2nd setting top right list: "Set Application Pool Defaults.." change there the default from 2.0 to 4.0 et, voila.

Register ASP.NET for IIS
a. Run CMD as Admin
b. CD to \windows\microsoft.net\framework\v4.x
c. Aspnet regiis -i

Related

Asp.Net Version error after deploying to IIS 7

I have developed my Application in asp.net 4.0 and I want to run it on localhost.
So I deployed my project in IIS but after deploying when I went to change Application pool from 2.0 to 4.0 I didn't find version 4.0 in application pool.
So I went to following path to check that Asp.net 4.0 version available or not.
C:\WINDOWS\Microsoft.NET\Framework\
But I didn't find version 4.0, Only version 2.0 Available.
I have done following things to run my application on localhost
Installed Windows 7
Installed IIS (with full features)
Deployed successfully my project to IIS
What I am missing here ?
Please help guys....
I would suggest starting at installing .NET 4.0.
https://www.microsoft.com/en-us/download/details.aspx?id=17851
Let us know if that helps.

In Microsoft Azure .net Framework is not recognized in IIS Application Pool

I am trying to make some ASP.NET website work on Azure.
I have a SQL Server running on the same machine, meaning minimum .net 3.5 is working on it. Also I installed version 4.0 and 4.5 while 4.0 shows up in registry and 4.5 won't show up. Also I can't re-install 4.5 because it is already installed.
In IIS only the .net CLR version shows up, there is no option to make my websites use any other .net Framework version.
When I try to register them using command line : aspnet_regiis.exe -ir
I get the following error on my 2012 Windows Server:
This option is not supported on this version of the operating system. Administr
ators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Win
dows Features On/Off" dialog, the Server Manager management tool, or the dism.e
xe command line tool. For more details please see http://go.microsoft.com/fwlin
k/?LinkID=216771.
also it shows:
Finished installting ASP.NET ...
But nothing shows up in IIS. What options do I have left? I don't know any.
Here my selected version in IIS, 4.0
Here what It shows for the apppools
http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45
This has all details. Basically in server you need to use "Add Roles". So check whether 4.5 is enabled in the "Web server (IIS)" role.

Running ASP.NET vNExt on .net 4.0

If I have a server running on .NET Framework 4.0.
Will it be possible to run ASP.NET vNext on top of that? Or will a higher framework version be required?
As stated on Asp.NET vNext's page on GitHub the minimum requirements for Windows as follows:
Windows 7 or Windows Server 2008 R2.
.NET 4.5.1 for hosting in IIS
However, ASP.NET vNext will let you deploy different versions of the .NET Framework via NuGet packages for different apps on server as stated here. But it's not .NET Framework 4.0 anyway. So, you need the higher version.

ASP.Net - Service Unavailable

So im migrating my website to a new web server (win 2003 64bit)
Setup the website set the framework to 4.0, browse the site and get "Service Unavailable"
mmm, useful.
I notice that that the AppPool Crashes,
The event log reports "A process serving application pool 'DefaultAppPool' reported a failure. The process id was '193312'. The data field contains the error number."
Also I did have to follow this guide as my Asp.net was missing
2E002E002E00.aspx">http://weblogs.asp.net/plip/archive/2006/05/25/Where_2700_s-the-ASP.NET-Tab-in-IIS_3F00_-It_2700_s-Missing_2100_-I_2700_ve-installed-.NET-2.0-2E002E002E00.aspx
Any Ideas what I need to do to fix this?
Thanks
It looks like your default app pool was set to .net 2.0. Unlike 3.0 and 3.5, the 4.0 framework does not run on the 2.0 base. You will need to set up the apppool to use .net 4. If you are using IIS 7 you will be able to have 2 app pools using different frameworks. However IIS 6 can only run 1 framework at a time. So if you are running IIS 6 you will need to choose 2.0 or 4.0.
Ensure that the application pool is set to 'Allow 32bit applications'=true.
you can check this by right clicking the application pool and choosing 'advanced settings'
Solution was to uninstall IIS and framework, reinstall .net framework (64bit) by using aspnet_regiis -i

Deploying mvc project to iis 6.0

I am trying to deploy my mvc project on windows server 2003 IIS6.
I have enabled the wildcard mapping
.net framework 3.5 sp1 and mvc 1.0 is installed on the machine
I am still getting 404 when I try to access the site
What other steps should I debug to solve this problem?
Ps: Other non-mvc .net project is running fine on the machine
my problem was not referencing the 64bit version of aspnet_isapi.dll - i am running on win2003 64bit

Resources