How to host an ASP.NET Web Applications site on IIS 7
Solution 1
The error will be probably because of, you developed the site in .net version 2.0 and try to run under the Integrated pipeline apppool that runs under .net framework 4.0.
SoL:
Create a new apppool with classic mode and .net framework equals to your application developed framework.
attach the newly created apppool to your virtual directory.
Note: For deployment, you don need to copy .csproj or unwanted solution files to destination location.
If it is otherway around, (i.e,) application is .net 4.0 and apppool is 2.0 please follow the below steps.
- Update .net framework in the server to 4.0 if you have only 2.0.
- Then register .net 4.0 version in IIS by running the following command in command prompt.
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i
Solution 2
Try changing Application pool to Classic. To do that open Advanced settings of your application in IIS manager and change Application Pool. There should be "ASP.NET v4.0 Classic" or something similar according to your framework version.
http://technet.microsoft.com/en-us/library/cc731755(v=ws.10).aspx
Vivendi
Updated on June 04, 2022Comments
-
Vivendi almost 2 years
I'm locally working on an ASP.NET Web Applications site. It's almost finished so i wanted to try and put it in an IIS server.
The IIS server is running on a different server. What do i need to do to run my ASP.NET web site in that remote IIS server?
I tried to following:
I copied my entire project directory (so including the
.csproj
file, thebin
folder etc.) to the following location on the remote server, where IIS is runningC:\MyProject
.In IIS manager i added a
Virtual Directory
underDefault Web Site
. Located my Web Site files inC:\MyProject
and added that folder. Then in IIS manager i converted thatVirtual Directory
to an Application.But when i browse to my Web Site i get an error:
HTTP Error 500.23 - Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
So this is probably not the way to do it. I don't think i can just do a Deploy, because i never set up any .axd(?) or anything.
So my question is, what do i have to do in order to run my Web Site on IIS..?
-
Vivendi about 11 yearsIt seems to be the other way around. My Web Site is developed in .NET 4.0, but the
DefaultAppPool
is set to .NET Framework Version v2.0. I can't change that version to .NET 4.0. Is that normal or should i update the server with a newer .NET version? -
Vivendi about 11 yearsI see the
Classic .NET AppPool
. But that is set to .NET Framework Version 2.0. Does that mean i have to update the server with a newer version of .NET? Because i can't select any other version from the dropdown list other thanv2.0
orNo Managed Code
. -
fofik about 11 yearsyou should install .NET Framework 4.0 as you use in development. If you have installed .NET 4 already, you need to run aspnet_regiis.exe with -i option. link
-
Monie corleone about 11 yearsdoes your server have .net version 4.0?