What is the easiest way to convert from asp classic to asp.net?

前端 未结 9 1382
离开以前
离开以前 2021-01-01 22:58

I am a .Net developer that has been tasked with upgrading a classic asp website to asp.net. The website is currently running on luck and bubble gum but there is not enough t

相关标签:
9条回答
  • 2021-01-01 23:11

    You may want to look at the new ASP.NET MVC framework. The level of flexibility is amazing and the coding style is slightly more akin to the ASP classic approach, albeit with much better separation of church and state.

    0 讨论(0)
  • 2021-01-01 23:14

    Don't throw away your code!

    It's the single worst mistake you can make (on a large codebase). See Things You Should Never Do, Part 1.

    You've invested a lot of effort into that old code and worked out many bugs. Throwing it away is a classic developer mistake (and one I've done many times). It makes you feel "better", like a spring cleaning. But you don't need to buy a new apartment and all new furniture to outfit your house. You can work on one room at a time... and maybe some things just need a new paintjob. Hence, this is where refactoring comes in.

    For new functionality in your app, write it in C# and call it from your classic ASP. You'll be forced to be modular when you rewrite this new code. When you have time, refactor parts of your old code into C# as well, and work out the bugs as you go. Eventually, you'll have replaced your app with all new code.

    You could also write your own compiler. We wrote one for our classic ASP app a long time ago to allow us to output PHP. It's called Wasabi and I think it's the reason Jeff Atwood thought Joel Spolsky went off his rocker. Actually, maybe we should just ship it, and then you could use that.

    It allowed us to switch our entire codebase to .NET for the next release while only rewriting a very small portion of our source. It also caused a bunch of people to call us crazy, but writing a compiler is not that complicated, and it gave us a lot of flexibility.

    Also, if this is an internal only app, just leave it. Don't rewrite it - you are the only customer and if the requirement is you need to run it as classic asp, you can meet that requirement.

    0 讨论(0)
  • 2021-01-01 23:14

    Try these links

    Migrating from ASP

    Key Considerations

    Converting ASP to ASP.NET

    ASP to ASP.NET Migration Guide

    0 讨论(0)
提交回复
热议问题