Best way to convert from asp to aspx

abi picture abi · Jan 13, 2014 · Viewed 14.3k times · Source

I have got a bunch of classic asp pages(around 400 pages).However my client doesn't want me to rewrite the application right from the scratch. I have tried with http://www.asp.net/downloads/archived-v1.1/migration-assistants/asp-to-aspnet/ but it didnt work as I am working on visual studio 2012. Is there any other way/tool for conversion which is quite easier and faster? Thanks in advance

Answer

Neil Cresswell picture Neil Cresswell · Jan 14, 2014

ASP.NET is not an updated version of classic ASP but actually something rather different so unfortunately there is no magic bullet and you'll need to review each of your script files and rework each one.

For less up-front rework, you can use VB.NET as your ASP.NET language, and you can also use ASP.NET Forms (as opposed to MVC.) VB.NET gives you a syntactically similar language to VBScript (assuming you weren't using JScript.) Forms gives you a similar structure without having to separate your logic from your content. Very broadly speak an .aspx page is kind of like your .asp page, except you can have code in an extra code-behind page, (.cs.)

However, you should inform your client that if you do that, it will likely be a huge problem from a maintenance perspective later on. Although ther are plenty of VB.NET sites out there, C# is the most common and almost ubiquitous choice as a language for ASP.NET and .NET in general and as time goes by, it will be harder to find people willing to work with VB.NET. (Think how many JScript coders you know with classic ASP and you'll get the picture.) Further, not going with an ASP.NET MVC solution is also somewhat risky from a future-proofing perspective. Most languages are moving to MVC and similar models.

The bottom line is that you'd pretty much end up with a rewrite for a C# MVC solution, but it would be something maintainable down the line, whereas a VB.NET forms solution now would get you a faster conversion but you will likely even now have problems finding good developers who would want to work on it as many will prefer C# projects, given a choice.) A C# and MVC solution would also likely by design be cleaner and easier to maintain too.