Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I convert legacy ASP applications to ASP.NET?

We have a large ASP (classic ASP) application and we would like to convert it to .NET in order to work on further releases. It makes no sense continuing to use ASP as it is obsolete, and we don't want to rewrite it from scratch (Joel Spolsky tells you why).

Is there a way to convert it from ASP to ASP.NET automatically?

like image 212
Sklivvz Avatar asked Sep 21 '08 13:09

Sklivvz


People also ask

Is ASP classic still used?

It used scripting on the server to create content that would then be sent to a client's web browser, and it enjoyed a tremendous amount of success in its time as a result. Classic ASP, however, is no longer being developed by Microsoft at all - it has long since been replaced by ASP.NET in 2002, a newer alternative.

What are the applications of ASP?

ASP.NET is used to produce interactive, data-driven web applications over the internet. It consists of a large number of controls such as text boxes, buttons, and labels for assembling, configuring, and manipulating code to create HTML pages.


2 Answers

Even if there are tools to convert between classic ASP and ASP.NET, they're not going to generate very good results: the two environments are just too fundamentally different. A quick Google turns up a few results, mostly of the "we'll have our guys in India do it" variety.

My advice would be not to touch your existing ASP code for now. The runtime environment will be supported by Microsoft for the foreseeable future, so there's no urgent need to migrate. Instead, start working on new functionality in ASP.NET: this way, you won't be held back by legacy concepts, and can use the new coolness afforded by the Framework (including stuff like ASP.NET MVC) in any way you see fit.

Of course, your new code will need to work with the existing ASP environment. Sharing session state between ASP and ASP.NET will most likely be one of your first requirements, but you'll soon identify more issues like that.

The 'right' solution for such issues will depend entirely on your current code and requirements: sometimes, you'll be able to wrap .NET code in a COM object for use by your ASP code, sometimes partial porting/migration may be the solution.

However, on average, the 'two worlds' approach should be entirely feasible, and allow you to develop exciting new features without having to worry about your legacy code.


December 2009 addition to original answer: Just came across the ASP Classic Compiler, which is an actively maintained VBscript compiler that converts classic ASP pages into code that runs natively on ASP.NET. It has several cool features, such as the ability to use it as a ASP.NET MVC custom ViewEngine, so despite its beta status, it would definitely seem worth keeping an eye on...
like image 137
mdb Avatar answered Oct 11 '22 15:10

mdb


Well, I used to work for the company where all web apps were classic ASP. When decision was made to move to .NET we had to find a way to transform 168(!) web apps into this new framework. I tried all the tools available at the time to do this and all failed.

Best way is to build a new web server and start there from scratch, this way you can be sure that upgrade will happen fast and will work without any hick-ups because of old-new integration. You will be able to choose what functionality and visual appearances to keep and which one to change. Do not waste your time on automatic tools to upgrade your old ASP files/sites into NET platform. None so far have ever worked properly.

And on top of that if you have database on back end, you will run into problem with connection to it from web apps.

like image 37
alexsts Avatar answered Oct 11 '22 14:10

alexsts