Upgrading ASP.NET from version 1.1 to 2.0 - Any Gotchas?

*爱你&永不变心* 提交于 2019-12-01 05:30:59

问题


I know we are really behind the times here, but we are just about to upgrade from .NET 1.1 to .NET 2.0.

Thank you for your sympathy.

Anyhow, are there any gotchas we should look out for?
Do you have any general advice before we jump in?

Please do not post telling me to go straight to 3.5: 2.0 is all we're allowed!

We're using mostly C#.


回答1:


Here is my recommendation before upgrading:

  • If you are used to use Visual Studio 2003, you will need to go for VS2005. You will have to convert the old solutions and projects so that it will be compatible with VS2005. Make sure to have a backup of the project you're going to convert so that you can roll back or even use it as source for any modification you may need to the converted projects.
  • If you're developing web applications using .NET 1.1, make sure that all the virtual directories and applications in the IIS is configured to work with ASP.NET 2.0. You may need also to configure a new Application Pool for your .NET 2.0 applications.
  • If you're using any third party libraries in your .NET 1.1 projects, you may need to confirm its compatibility with .NET 2.0 projects. Some old libraries used in .NET 1.1 are not compatible with 2.0.



回答2:


Yes. The most important thing for you to know is to use a Web Application Project, not a Web Site. Web Sites use a totally different compilation model and migration is pretty much a disaster. Web Application Projects are much more similar to how things worked in 1.1.

We also had an intermittent problem with redirecting from the login screen, but according to Google, we were basically the only ones who had that problem - we've since resolved it.

Most of the other problems we ran into were small and easy to navigate, and the overall experience was a net improvement.




回答3:


One gotcha is home-grown 1.1 implementations of .NET 2.0 stuff (that was missing in 1.1) like RegistryHandler and so forth. Sometimes your newly-ported 2.0 code will look like it's properly using a 2.0 class when it's really using the home-grown version.




回答4:


Deployment is another gotcha, if you're upgrading an already-deployed app. You have to switch the .NET version in IIS from 1.1 to 2.0.




回答5:


I remember we had to change some client scripts, because the way ClientIDs are generated for server controls changed from ASP.NET 1.1 to 2.0.

I don't remember the exact circumstances, but some IDs which previously wer prefixed ctl0_ became ctl00_...



来源:https://stackoverflow.com/questions/274994/upgrading-asp-net-from-version-1-1-to-2-0-any-gotchas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!