0

For the past year I have been working in a Classic ASP \ ASP.net hybrid. The website has 1M+ hits daily. The code, as you can imagine, is very hard to navigate. There are 200+ files. Dozens of includes...

<!--#INCLUDE virtual="sub/head.aspx"-->

I need to make a function that would be used throughout the website and I don't even know where to put it. There is no Visual Studio project file.

My questions is... how can I upgrade it to a full ASP.net website. MVC is not an option since the owner is concerned there will be a performance decrease. I would be happy if I could load it up in VS and have a app_data folder, plus all the goodies of ASP.net (when compared to classic asp)

5
  • 1
    You need to ask this question on Stackoverflow.com. There are already answers there relevant to your question. This is a forum to talk about programming issues and problems. FYI: stackoverflow.com/questions/2679362/…
    – Maxood
    Feb 14, 2014 at 12:53
  • @Maxood On stackoverflow it would get closed as offtopic or similar. Thanks for the link
    – Cornwell
    Feb 14, 2014 at 12:55
  • 1
    My experience with ASP.NET and ASP.NET MVC is that the MVC site will generally perform better. Also related: programmers.stackexchange.com/q/68455/1204 Feb 14, 2014 at 16:21
  • See also stackoverflow.com/questions/894720/…
    – Brian
    Feb 14, 2014 at 20:01
  • Both options in the OP are dated. Why? Because this issue, neither unique nor original has been "painful" for developers for a long time. What changed? it's the approach. A new approach using a more sophisticated and tool-based technique, actually a new process and a set of tools were developed based on code understanding (AST) and a traditional code development approach (Visual Studio / IDE). I am not going to get more commercial, but it's worth a look if you are facing this issue. See this idea explained at Guy's blog: gizmoxts.com/2014/09/guy-peled-gizmox-transposition-started
    – GilShalit
    Oct 30, 2014 at 6:18

2 Answers 2

1

Classic ASP doesn't have a project file. It is a step above an HTML page, but not by a huge amount.

To convert this, you are going to have to create a new project (web application if you can, it will save you headaches later).

The INCLUDEs should still work in ASP.NET. You might have to modify them slightly. You may also have to turn on a configuration switch in IIS.

All of the server side code will be VBScript. You will have to convert it to either VB.NET code or C#.

If you have data access, it could be DAO, RDO, or ADO. ADO to ADO.NET will be pretty simple to convert. DAO and RDO use similar naming, so it should be straight-forward, if tedious, to convert them as well. Most of the conversion from DAO/RDO to ADO.NET will involve the way you get data into the server page. The Connection object will be similar enough that you may be able to use it directly. From there on out though, you will have to do things ADO.NETs way. Resultsets will need to be changed to TableAdapters, among other changes.

I doubt that you will have to make any changes to your CSS.

Your javascript that is on the page will probably stay the same too.

As for performance, compiled pages or web applications, are very fast and will be faster than the interpreted ASP pages.

0

I don't think there is a tool or something to just magically upgrade a classic ASP site to ASP.NET. I think you will need to write the code. The good news is you already have the markup and changing it to RAZOR should be pretty trivial, tedious mostly.

As for the performance concerns about MVC, that is without merit. MVC should be faster than WebForms. For the record 80-95% of web performance issues are in how the markup, css and JavaScript are structured to work in the browser and transport across the wire. While WebForms has gotten better in recent years there are many artifacts that make it less than optimal. My advice, if you cant use MVC and are forced to use the WebForms engine, do not use any of the controls and disable the viewstate. I did that few years back when I transitioned off WebForms and into modern web development. It worked well.

Not the answer you're looking for? Browse other questions tagged or ask your own question.