Migration of asp to asp.net(c#.net) - asp-classic

I've a website developed in classic asp.
Now I want to convert it to asp.net(2.0 or above).
How can I do it without coding from scratch?
Can you suggest a free or cheap tool to do the work?

In my experience when you switch platforms like this you are basically doing a full rewrite. Any conversion tools that you find will end up producing code that 1) probably doesn't fully work, and 2) is messy code in the destination language that will be hard to maintain.
Then of course there is the bigger problem: you most likely want an entirely different architecture in ASP.NET versus what you had in ASP. Better to revisit the requirements of the application, think about the architecture and design, and reimplement. Use the source code as a guide for how certain pieces work, but don't do a pure conversion.

I don't think there is any good news here. Automatically translating ASP code to ASP.NET will require a lot of busywork. Perhaps you can farm out to an offshore developer who can do this gruntwork for you?

Rename all the pages to .aspx (or of cource configure iis to use .net to process .asp pages). Classic asp runs fine in .net. Now start one page at a time and change only the stuff that actually benifits from being asp.net. Just an option. I'm just saying.

Using asp to asp.net migration assistant we can do it. I could convert my asp project to asp.net 1.x using asp to asp.net migration assistant.
But there were a few run time errors as well as DB connecting problems after the conversion.........
System Requirements
Supported Operating System
Windows 2000, Windows 98, Windows ME, Windows NT, Windows XP
Microsoft .NET Framework Version 1.1 Redistributable Package
as per http://www.microsoft.com/en-us/download/details.aspx?id=18312

Related

What is the best way to upgrade my Classic ASP WebApp? Advice and Opinions Needed

I am currently maintaining an in-house business tool for our company's timesheets and project information. I need some general advice regarding web languages and best practices.
Details:
Runs on Windows Small Business Server 2008
Combination of Classic ASP, JavaScript, CSS and Javascript
Access database backend
Large system, containing around 135 pages, of 2.3 MB total
Objectives:
Extend functionality in small ways
Possibly move to different languages to ease maintenance (AJAX?)
Separate code from HTML structure (currently VERY messy)
1) Given that I don't have a lot of time to entirely rewrite the system, is it sensible to keep going with ASP and JavaScript?
2) I've had a look at some AJAX and it seems like it would be an easy leap to include it in the page, is this an avenue worth pursuing?
3) Is it worth investigating an MVC framework? If so, does this need to be done formally with some kind of library, or are there best practices I can follow to implement MVC functionality using ASP?
4) How difficult might it be to upgrade to a 'real' DBMS such as MySQL and port the database? Is it worth doing? (Feel free to smack-talk Access)
Sorry for the length, I'm just a little lost in the giant multitude of Web standards, languages and practices.
1) For the javascript part take a look at Jquery. Normally this cuts down old javascript code to 1/10 of size and a better separation of ASP/HTML Code and JS Code. Ajax comes for free and it has a really good plugin ecosystem.
3) From my experience porting such a big system is not a good idea.
ASP Classic runs smoothly under IIS 7.5 ans IIS Express so you can take the good parts like Url Rewrite and other IIS plugins. If you need more power in your ASP classic pages simply combine them with ASP.NET pages. It is no problem to run them side by side, I usually use ASP.NET generic handler (.ashx) if I need the power of the .NET Framework to complete tasks like dynamically generated Zip files for example.
4) Upgrade to Sql Server Express.
Microsoft SQL Server Migration Assistant (SSMA) will help you to convert the Access DB to SQL Server. I've done this before with a 1 GB (no binary data) 200+ tables database and migrated the old ASP system in a week to SQL Server.
With Jquery, IIS 7.5 or IIS Express, .Net Framework 4.0 and Sql Server 2008 Express you can "pimp" your system in much less time than porting it completely.
Seriously, if the thing works and performs for you as is, then I'd "extend the functionality in small ways" and possibly add in some Ajax, if you think it would offer enough value given you limited time.
I'd certainly not consider porting a 135 page application just for the sake of porting it.
Access has its issues, but if you're not running in to them, I wouldn't take the time now to convert it.

New to ASP.NET

I am wanting to learn ASP.Net and am just a beginner. I have done some windows c# forms development before but have no experience of web development.
I have looked at the ASP.net website but beyond this, does anyone have any ideas as to good learning resources particulary in relation to the differences to windows development. For instance, It seems that the way events work is quite different under ASP to windows forms.
Thanks you all.
Thank you very much. I will have a look at MVC. It looks even more complicated but if this is the way things are going then I would be better maybe to invest my learning in this.
I would advise you at this stage in ASP.NETs life to instead direct your attention at ASP.NET-MVC. This url http://www.asp.net/mvc/ is a very good resource for learning.
ASP.NET Forms do a good job of hiding the nature of a connection-less HTTP/browser based technology and presenting a familiar Form with controls and lots of useful events environment that Windows Forms developers are used to.
However this approach comes with a price. For any serious project there is no avoiding getting under the hood of ASP.NET forms and properly understanding the underlying technology. At this point you start to realise the significant compromises the ASP.NET Forms has had to make in order to make Windows Forms developers feel at home.
ASP.NET-MVC, on the other, makes no such compromises. Learning MVC means learning how HTTP works up-front. It also has the advantage of being a much more test friendly approach which when used properly will save you days of debugging.
ASP.NET website - seriously, it's a really good resource.
I'd seriously consider starting with ASP.NET MVC. You'll end up learning what you need from ASP.NET "classic" but you'll pick up all the goodness of MVC (testability, seperation of concerns in your code etc) instead of learning bad habits.
Google for "ASP.NET MVC", check out ScottGu's blog, Scott Hanselmans's blog, or search StackOverflow for ASP.NET MVC (use the ASP.NET MVC tag too).
One good place to start...
http://weblogs.asp.net/scottgu/archive/2009/04/01/asp-net-mvc-1-0.aspx
I know they are a bit out of date, but I still think the two Fritz Onion books give a great look at what's happening in ASP.NET under the hood.
Some resources:
asp.net (as you mentioned)
channel9
scott hanselman's blog (some useful entries)
Windows Client Homepage
W3Schools Tutorials (Useful for more than just .NET, but this is the .NET page)
I've been a .NET Windows Forms (not Web forms) developer for 1 and a half years. Then I switched jobs and started using WebForms for like... 2 years. Then I discovered ASP.NET MVC (January 2008) and since then although I still master ASP.NET WebForms I will always prefer ASP.NET MVC.
My recommendation also goes into ASP.NET MVC. You will have to learn HTTP, HTML and a bit of Javascript but after these you will master web development on ALL PLATFORMS.
A great alternative to ASP.NET MVC is ASP.NET Web Pages with Razor syntax. In fact, the latest release of ASP.NET MVC and the latest release of ASP.NET Web Pages both use the same view engine.
Here is a link to the complete ASP.NET Web Pages book:
Getting Started with WebMatrix and ASP.NET Web Pages
Also, here is the complete WebMatrix Content Guide:
WebMatrix Content Guide
Here's the description:
WebMatrix is a free, lightweight set of web development tools that provides the easiest way to build websites. It includes IIS Express (a development web server), ASP.NET (a web framework), and SQL Server Compact (an embedded database). It also includes a simple tool that streamlines website development and makes it easy to start websites from popular open source apps. The skills and code you develop with WebMatrix transition seamlessly to Visual Studio and SQL Server.

ASP.Net portable server

I'm trying to start on a new project to help enrich my asp.net knowledge, since I'm not completely satisfied with what my class is teaching me. From my (very little) experience with Rails, I recall every application containing its own development web server. Say I were trying to create a local-only application, but I want it to run in a web browser (Therefore ASP.Net). Are there any options in terms of being able to distribute an application and have it launch its own, or just not require IIS/VS/Apache-mono?
You may want to look into aspNETserve. It sounds like it would fit your needs. I haven't worked on it recently, so it probably has some rough edges.
On the plus side its all open source, and if you are just getting started with ASP.NET it would be a real eye opener on how the internals of the ASP.NET lifecycle operate.
The simple answer is that you need a web server to run the application. It cannot run without one.
If we're talking demo purposes or you don't require that many features of a web server there are redistributable web-servers that you can include with your setup package.
Like Alex mentioned the most popular one seems to be Cassini.
I'm assuming that you want to run the site on the same machine you are developing it on.
Visual Studio 2005 and up allows you to run the site from VS itself if you want to view it locally on your development machine.
To my understanding Visual Web Developer allows you to do the same as well.
Visual Web Developer
You can use the cassini web server. Please note that those are different redistributable:
http://www.asp.net/Downloads/archived/cassini/
http://ultidev.com/products/Cassini/
I'm not really certain why you would want to develop a web application (with all the difficulties it entails, due to the fact that you are dealing with a stateless connection to an unknown client machine), but then run the entire thing on the client machine.
Surely it makes more sense to develop a WinForms application?
Follow this guide to setup IIS on your PC to run ASP.NET apps:
http://www.geekpedia.com/tutorial25_Setting-up-your-ASPNET-server-IIS.html

Are there any real limitations in Mono regarding ASP.NET?

I am a junior developer, doing my last year at college. I'm mostly asp.net oriented and even have a part time job coding in that language. I am interested on converting to linux and since visual studio is unsupported write my code in Mono.
Are there any notable limitations in Mono that I should be aware of (regarding ASP.NET)?
According to the Mono website:
Mono's ASP.Net does not implement the
following features:
Precompiled Websites
Webparts APIs.
Also most if not all 3rd party ASP.Net controls are not compatible with Mono unless otherwise specified. ComponentArt controls for example are not usable in Mono. However, there's no reason to think that this won't change as Mono gains popularity. ComponentArts has already mentioned that they are considering adding support in the future.
I'd say the biggest thing you lose is IIS. ASP.net and IIS were very deeply linked. Many of the advantages from ASP.net come from the utilization of hosting features in IIS. The biggest one I can name is the ability of HTTP.sys to directly respond to a request in kernel mode if the page is in cache. This means that the socket open is responded to immediately and can allow for orders of magnitude more hits to your webserver.
Its a bit of an edge case but Microsoft's Web Service Enhancements are not supported on Mono. I ran into this problem trying to get some WSE services working on Mono.
Regarding web services there are two very good open-source alternatives: ServiceStack.Net (using it) and NANCY.
These area a lot easier implement, use and maintain, IMHO, than services built on top of WCF.

What is ASP.NET?

I've been strictly in a C++ environment for years (and specialized statistical languages). Visual Studio until 2001, and Borland since. Mostly specialized desktop applications for clients.
I'm not remaining willfully ignorant of it, but over the years when I've dipped into other things, I've spent my time playing around with JavaScript, PHP, and a lot of Python.
Is "ASP.NET" the language? Is C# the language and "ASP.NET" the framework? What's a good answer to "What is ASP.NET"? Is there a correspondence between ASP.NET and anything I'd be familiar with in C++?
I know I can google the same title, but I'd rather see answers from this crowd. (Besides, in the future, I think that Google should point here for questions like that.)
I was going to write a lengthy answer but I felt that Wikipedia had it covered:
ASP.NET is a web application framework
developed and marketed by Microsoft,
that programmers can use to build
dynamic web sites, web applications
and web services. It was first
released in January 2002 with version
1.0 of the .NET Framework, and is the successor to Microsoft's Active Server
Pages (ASP) technology. ASP.NET is
built on the Common Language Runtime
(CLR), allowing programmers to write
ASP.NET code using any supported .NET
language.
So ASP.NET is Microsoft's web development framework and the latest version is 4.0.
How do I get started? Check out the following resources:
Learn ASP.NET
ASP.NET Documentation
ASP.NET Developer Center
ASP.NET is the framework, just like .NET
The code itself, will be a mix of HTML, JavaScript(for Client-Side) and any .NET compatible language. So C#, VB.NET, C++.NET, heck...even IronPython
ASP.NET is a web application framework
developed and marketed by Microsoft,
that programmers can use to build
dynamic web sites, web applications
and web services. It was first
released in January 2002 with version
1.0 of the .NET Framework, and is the successor to Microsoft's Active Server
Pages (ASP) technology. ASP.NET is
built on the Common Language Runtime
(CLR), allowing programmers to write
ASP.NET code using any supported .NET
language.
ASP.NET (Wikipedia)
That's on the second result searching on Google so I'm guessing (half-expecting) that you don't understand what that means either.
Webpage development started with simple static HTML pages. That meant the client asked for a page by means of an URL and the server sent the page back to him/her exactly as it has been designed. Sometime after that several technologies emerged in order to provide a more "dynamic" or personalized experience.
Several "server side languages" were developed (PHP, Perl, ASP...) which allowed the server to process the Web page before sending it back to the client. This way when a client requested a webpage the server could interpret the request, process it (for example connecting to a database and fetching some results) and send it back modifying the contents and making them "dynamic". The fact that the process took place on the server stands for the name of "server side".
So the original ASP (predecessor of the ASP.NET) was a server side language that was focused on serving web pages. In such way it supported several shortcuts such as the possibility to intercalate HTML and ASP source into the file which was on that time much popular due to PHP implementation. It was also (as most of these languages) a dynamic language and it was interpreted.
ASP.NET is an evolution of that original ASP with some improvements. First it does truly (try to) separate the presentation (HTML) from the code (.cs) which may be implemented by using Visual Basic or C# syntax. It also incorporate some sort of compilation to the final ASP pages, encapsulating them into assemblies and thus improving performance. Finally it has access to the full .NET framework which supports a wide number of helper classes.
So, summing up, it is a programming language located on the server and designed to make webpages.
ASP.NET is a framework, it delivers:
A class hierachy you hook into, that allows both usage of supplied components, as well as development of your own.
Integration with and easy access to the underlying webserver.
An event model, which is probably the "best" thing about it.
A general abstraction from the underlying medium of HTML and HTTP.
Not sure if ASP.NET compares to any C++ frameworks you may be familiar with. Web frameworks usually tend to be unique due to the statelessness of HTTP and the relatively low-tech technologies involved (HTML, scripting, etc).
Let's say it's a technique from MS to build web applications. ASP stands for Active Server Pages, .NET is the framework behind it.
C# and VB.NET are the languages which can be used, but I guess other .NET languages also can be used.
Take a look at MS' info for those who don't know or understand the platform.
http://www.asp.net/get-started

Resources