Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 28, 2011 01:47 PM by bbcompent1
Apr 27, 2011 05:55 PM|LINK
I have a classic ASP web site that I want to migrate into a new ASP.net 3.5 site. I first created a new ASP.net web site in VS2008. According to MS, I can run the two sites side by side. I think MS called this a horizontal installation. I started
to copy the Classic ASP pages to the new site. and tried opening the ASP home page.
When I try to open the home page, I get the error - required Object:Server. It appears to be failing on the line of VBScript code:
Set cnn = Server.CreateObject("ADODB.Connection")
1) How can I resolve this error?
2) Do know of any link that explains how to migrate a Classic ASP site to an ASP.NEt 3.5 web site keeping the original ASP code?
Thanks for your help.
Apr 27, 2011 06:47 PM|LINK
One thing I can think of right off the bat is make sure that IIS is permitting ASP pages to run. By default, they are disabled.
Apr 27, 2011 06:49 PM|LINK
Apr 27, 2011 06:50 PM|LINK
And also read up on this link too:
Apr 27, 2011 06:53 PM|LINK
Did you download the asp to asp.net migration tool? That will help with a lot of the heavy lifting part of this...
Apr 27, 2011 06:55 PM|LINK
One more resource for you:
Sorry about the firehose of info but this is a subject near and dear to my heart :)
Apr 27, 2011 06:58 PM|LINK
Migrating from classic ASP to ASP.NET does not involve plugging your old VBScript into pages ending in .aspx. It won't work. VBScript is not a supported .NET language. In other words, you cannot use the old ASP code in an ASP.NET applciation. To resolve
your error, put the right file extension back on the page that contains that code: .asp.
Migrating a site effectively means rewriting it using a .NET supported language - VB or C#, and using the .NET framework rather than the old COM based ADO stuff. There is absolutely no point in retaining the old ADO stuff (which you can do). You are wasting
your time changing over to .NET if you do.
You can change each page one at a time if you like, but if you are using sessions, you have a little fiddling around to maintain state between the two conpletely separate applications. And be mindful of the fact that while they might run under the same domain,
they are completely separate - as separate as having a mixture of PHP and ASP files.
Apr 27, 2011 07:39 PM|LINK
Did you download the asp to asp.net migration tool?
Are you joking? That was for ASP.NET 1.1 and was so poor that MS basically ditched it. The clue is in the URL to it (http://www.asp.net/downloads/archived-v11/migration-assistants/asp-to-aspnet). It's useless for ASP.NET 3.5. You are better
off leaving the app as classic ASP than fiddling around with the mess that the migration tool makes.
Apr 27, 2011 07:51 PM|LINK
One more resource for you:
That article was written nearly 10 years ago. I doubt Scott Mitchell would look at it now without squirming with embarrassment. For one thing, it features a nice example of SQL injection-prone code. But it's not much better than anything else that was published
when the priority in those days was to be seen to port to .NET as soon as humanly possible, by just sticking .aspx extensions on a COM-based application.
Sorry if I seem to picking on your posts one at a time - it's just that they were posted one at a time
Apr 28, 2011 11:06 AM|LINK
Granted Mike, all very valid points. The major issue though is MS really hasn't done much to help developers in the realm of moving forward beyond that original stuff. I was giving those examples to help since there isn't much late-breaking info on how to
properly migrate classic to .net. I figured the worst case scenario is he could jump from classic to .net 1.1 then upgrade that project to 3.5 though still he will have some fork-lift work to do. For the more experienced developer, the best course of action
is of course to rewrite everything from scratch.