简体   繁体   中英

IIS7 running .net 2.0 application under .net 4.0 CLR

I want my .net2.0 webservice application to run on IIS7.0 under CLR4.0, Is this possible simply creating an apppool with Classic,.netframework 4.0 settings and pointing my app to this pool? I have tried this and it works fine, but want to confirm on right track?

Thanks gauls

What you are doing should work fine, as your tests have already shown. However, when I researched this several months ago, I remember reading at least one article that indicated that it is generally preferable to use the integrated rather than classic pipeline, unless you have a compelling reason not to. I can't find that article now, but the following article: New IIS7 Article: Taking Advantage of the IIS7 Integrated Pipeline explains some of the benefits.

So although classic mode is adequate for your situation, you certainly don't have to use the classic pipeline to run .net 2.0 apps, unless you are using custom ISAPI extensions or filters. Assuming you have none of those (custom ISAPI stuff), if it were me, I would move to the integrated pipeline, simply because that was one of the main improvements of IIS7, and there doesn't seem to be anything to gain by sticking with the II6 model.

NOTE: I am currently running .Net 3.5 apps, using integrated pipeline, with no problems. As far as IIS7 is concerned, .Net 2.0, 3.0 and 3.5 apps are all the same, since all of them use CLR v2.0. So I can't imagine why you would have any problems using the integrated pipeline with CLR v4.0.

yes changing the app pool works and is the right way to run .net 2.0 app on CLR 4.0 for web applications. debugging will need a change in the registry. I have successfully tested and is running in production with no issue.

I'm not fully sure about this, but it should be backward-compatible.

Have you considered simply setting the apppool to run under .NET 2.0?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM