ASP.NET 2.0 to 4.0
I have a site in ASP.NET 2.0. I plan to move to 4.0. Is there any thing in particular I need to take care of or I just select the 4.0 framework and recompile and VS 2010 will update 开发者_StackOverflow社区the web.config to reflect the changes?
There are some few thinks that you must take care of.
Read all the changes and have it near you on tests: http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes
The validation mode has change: Can I deploy .net 4.0 web application on IIS6?
The default.aspx has change when you try to get the url : Default.aspx with IIS 6.0 and .Net 4?
one thing you need to do upgrading or not is the workaround to the padding oracle vulnerability.
Even more important when you move to anything above 3.5 sp1.
Overall it should just work.
Just use the conversion wizard when prompted and you should be good. Note: if you are using source control with others, the version number in the project file will change (vs2008 = "9" and vs2010 = "10").
Also, if you experience any JavaScript issues, make sure you choose the correct setting for identifying the IDs in 4.0:
http://weblogs.asp.net/asptest/archive/2009/01/06/asp-net-4-0-clientid-overview.aspx
I haven't been able to get the Conversion Wizard to reappear, but I have been able to convert to .NET 4.0 by:
Right Clicking on my website
Selecting Property Pages
Then go to Build tab
Change Target Framework
This made all the changes to my web.config automatically just like the conversion wizard would.
You can find good documentation for the migration from Framework 2.0 to 4.0 on below website.
https://msdn.microsoft.com/en-us/library/dd483478.aspx
It helps me lot.
精彩评论