Posted on 2011-04-27
Last Modified: 2013-03-07
I have a classic ASP web site that I want to migrate into a new 3.5 site.   I first created a new 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")

Two questions.

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.
Question by:deepPowdah
    LVL 96

    Expert Comment

    by:Bob Learned
    It is tough to know whether this question came before or after this post:

    Were any of the comments helpful?  Are you still at a loss for a solution?  The problem of ASP classic and ASP.NET has long plagued the web developer.

    Author Comment

    Thanks for your inquiry.  I actually started with  THen I would see if Experts Exchange had any more information.  

    So far I'm still wallowing in the mud.

    LVL 21

    Expert Comment

    Create a new Visual Studio Web Application (not Site) project.

    Copy your ASP side into the new folder structure.

    Click on the Show All Files button in the Solution Explorer.

    Right-click on each ASP file and folder in the old site and select "Include in Project"

    That should accomplish the basics of getting the ASP code into an ASP.NET project. Now you can start adding ASP.NET WebForms to the project as you wish.

    From the error you're getting it almost sounds like you may have renamed the .asp files to .aspx. Don't do that.

    Another option would be to make use of the ASP to .NET compiler available here...

    Author Comment

    Thanks for your reply and I will try your resolution.  But first I want to isolate what appears to be the critical issue (at least the immediate issue).  I created a web site in VS2008 and copied all the files from my Classic ASP web site (the original web site was running on a WIndowsXP box).  When I try to open it as a Classic ASP web site, i.e http://localhost/WebSite folder, I get the object required: Server message in the following line of code

       set cnn = server.createObject(ADODB.Connection)

    So how can I get the system to recognize "server?"

    LVL 21

    Accepted Solution

    First, you should be creating a Web Application, NOT a Web Site. That's probably part of the problem.

    Are you using IIS or Cassini (the built-in web server)? Cassini can't serve up ASP pages.

    My guess is it's trying to interpret the page as a .NET page and not handing it off to the ASP handler. There could be many reasons for that. I think recreating the project correctly should be your first step.

    Author Comment


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and Log…
    The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now