Technology For Your Business For Your Life

Thursday, January 10, 2013

Upgrading an Asp.Net website from version 1.1 of the .Net framework to version 4.0

I recently had to upgrade an asp.net application from version 1.1 of the .Net framework to version 4.0
I opened the vs 2003 application in visual studio 2010 and when prompted to upgrade the frame work to version 4.0. I said yes.

Visual studio did the conversion and these where the issues and fixes  I used on completion of this conversion.
1.'System.Configuration.ConfigurationSettings.AppSettings' is obsolete ---  Use Configuration Manager
2.'System.Web.Mail.SmtpMail' is obsolete   ---  Use System.Net.Mail
3.'System.Web.UI.Page.RegisterHiddenField(string, string)' is obsolete  ---  Use ClientScriptManager.Regist...
4. The state information is invalid for this page and might be corrupted          Add to pages section of web.config enableEventValidation="false"

Another issue I had was  that the application made use of Crystal Reports and these did not work after the framework as upgraded.
The fix here was to install Crystal for Visual Studio 2010 (CRRuntime_64bit_13_0_1).
Then reopen the application in visual studio 2010. It will now ask you if you want to convert the solution for crystal for vs2010 -- Say Yes.

Hope this helps someone.

Alwin

1 comment: