ASP.Net - Service Unavailable - asp.net

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

Related

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.

Deploying .NET 4.5 web app with Web Deploy

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

Why is IIS 6 / Windows 2003, forcing a Website to use .NET 2.0?

I have a Windows 2003 Server 64bit running IIS 6.0.
When I set the server up, I noticed that the 'ASP.NET' tab has been removed from the 'Web Sites' property in IIS Manager.
Now every website runs on .NET 2.0 and I need to change them to run on .NET 4.0.
I have ASP.NET 4 (32bit) enabled in the 'Web Service Extension' (the only other options ASP.NET versions 2 in both 32 and 64 bit modes).
I can confirm that in C:\Windows\Microsoft.net folder, there is both 'WOW' and 32bit .Net installation.
This is a production server with many websites and I'm afraid to run some IISReg scripts to put back the 'ASP.NET' tab.
When I try to the .Net 4 targeted website, I get an error:
Unrecognized configuration section system.web.extensions
The version information shows .Net 2.0
So what can I do?
Thanks!
As I indicated in my 'Comments' above, I had to run IIS in 32bit mode in a 64 bit system to target a certain web application. The background information for that can be see here:
http://dillieodigital.wordpress.com/2010/10/07/windows-server-2003-64bit-iis-6-32bit-asp-net-4-framework-and-targeting/
That resulted in running all websites in 32 bit mode with .NET 2.0. To get the new web application to run in .NET 4, I followed instructions, per:
http://mlichtenberg.wordpress.com/tag/iis6-asp-net/
Problem solved!
FYI.
Thanks.

Basic requirement to Run ASP.Net 2.0 Application in IIS 7.0

I am very new in IIS 7.0 (Using in Windows Server 2008).
I have my Web application developed in VS 2005 or ASP.Net 2.0. in Windows Server 2003 system.
Now i am migrating to Windows server 2008 + IIS 7.0, So please can any tell me what are the basic setting i have to perform on IIS 7.0 to run my existing application without any changes in code.
I read somewhere that i have to change my Web.config file.
Dont worry my friend, i just follow the following simple steps and it works for me
1- i copy the folder containing the application into the www root folder
2- open IIS from RUN INETMGR and check the application pool: make sure it contains .NET 2
3-convert to application
4-choose the classic .NET v2
5- set permissions and run the application
Good Luck !
This is a very useful link
ASP.NET 2.0 Breaking Changes on IIS 7.0
if you face any trouble, send your problem as comment and i will answer it
You may want to change your application to classic mode instead of Integrated mode, there are some gotchas moving into integrated mode. Its something to consider at least. Hopefully you have the opportunity to test before going live with IIS 7.

Asp.net on visual studio .net 2003 web component Issues

I want to run ASP.NET on VS 2003 but it raises an error which says:
"Visual studio has detected that web server is running asp.net version
1.0.The web application you are creating or opening can be configured to be compliant with asp.net 1.0. However, the web application will
not be able to use the new features from asp.net 1.1."
When I choose the option "Make the application compliant with asp.net 1.0", then it is unable to set the compliance saying
"Visual Studio.NET cannot create or open the application. The
likeliest problem is that required components are not installed on the
local web server. Run Visual Studio.NET setup and add the web
development component."
It seems that you are running Visual Studio 2003 on Vista, which is not supported.
By default, Vista does not include .NET Framework 1.1 SP1. Install it first. Make sure that SP1 is installed. If you look into properties of "c:\Windows\Microsoft.NET\Framework\v1.1.4322\mscorsvr.dll", you should get the version 1.1.4322.2032.
Enable IIS 6 Compatibility in Control Panel -> Program and Features -> Turn Windows features on or off. Check "IIS 6 Management Compatibility" under "Internet Information Servces".
Register .NET 1.1 with IIS by running "c:\Windows\MIcrosoft.net\Framework\v1.1.4322\aspnet_regiis.exe -ir". It will create the Application Pool targeted to Framework 1.1 with Classic pipeline in IIS7 and set Enable32BitAppOnWin64 property to true on 64bit OS.
Allow ASP.NET 1.1 in IIS7. Open the IIS Manager and click on the computer name in left tree. In main window select "ISAPI and CGI Restrictions" and make sure that ASP.NET v1.1.4322 is enabled. If not, select it and click Allow link on right side.
When you create an application on any directory that runs .NET 1.1 or lower, always select Application Pool that is targeted to Framework 1.1. For already configured applications, you have to change it manually.
You may need to update the script map of the ASP.NET application within IIS to use the newer version of the framework. I assume that .NET 1.1 framework and VS 2003 are already installed without issues.
Here is an MSDN article that should explain how to register the ASP.NET application within IIS to use the .NET 1.1 version using the aspnet_regiis.exe tool. Command-line reference for the tool is available here.
Visual Studio.NET cannot create or open the application. The likeliest problem is that required components are not installed on the local web server. Run Visual Studio.NET setup and add the web development component.
I faced this problem when I copied the project folder from the network shared location to my local system.
Solution: Create a empty folder in your local system. Copy the files from the original folder into the newly created empty folder.
In addition to the accepted answer, you may also need to add the actual "Web Development" component that is included with the Visual Studio 2003 setup file.
While in the menu, even after you install ASP.NET v1.1 & associated Hotfixes/security updates, as well as FrontPage Extensions for your version of IIS, you may STILL see a red X over the installation component.
This may seem very hacky, but for some reason the installer doesn't seem to do a very thorough check - just click the "Red X" and the "Update Now!" icon becomes visible, then you can install the component just fine.
Specs: Windows 10, Visual Studio .NET 2003 Enterprise
TIP: If you are running a newer version of IIS, you won't be able to "just create" an ASP.NET 1.1 application pool. You'll need to enter these appcmd.exe commands:
appcmd create apppool /name:"YOURPOOLNAME"
appcmd set apppool /apppool.name:"YOURPOOLNAME" /enable32BitAppOnWin64:true
appcmd set apppool /apppool.name:"YOURPOOLNAME" /managedRuntimeVersion:"v1.1"
appcmd set apppool /apppool.name:"YOURPOOLNAME" /managedPipelineMode:"Classic"
appcmd set apppool /apppool.name:"YOURPOOLNAME" /autoStart:true

Resources