Last post Feb 21, 2007 06:20 PM by wisecarver
Feb 14, 2007 08:15 AM|deemurphy|LINK
Is there a simple way to change an active server page web site to asp.net? Does all the code have to be re-written? Can the code be taken either into dreamweaver or MS Visual Web Studio?
Feb 14, 2007 08:23 AM|wisecarver|LINK
This is outside the scope of a simple answer but in short, no.
The Migration assistant does a fair job of upgrading your asp code.
You can also simply rename some of the pages and run asp.net in asp compatibility.
That's not really a good idea however.
Take a look in the Getting Started section.
There are a lot of upgrade resources on this site.
All the best,
Feb 14, 2007 08:34 AM|deemurphy|LINK
Which getting started are you referring to the one on Microsoft's web site or on this web site? Thank you your answer helps.
Feb 14, 2007 08:47 AM|wisecarver|LINK
I'd post some MSDN links but the MSDN server is Too Busy right now.
If you have any trouble feel free to ask, it's no problem.
Feb 14, 2007 09:29 AM|deemurphy|LINK
I see MSDN was busy which is why I posed here. I feel that your last page, ASP migration will be a wonderful place to start and if I have more questions, I will post here.
Again thank you so much for your help.
Feb 14, 2007 10:00 AM|wisecarver|LINK
Feel free to keep me posted, as to any help you need.
I also wanted to mention that you have some great asp.net user groups in your area.
Here in Johnson City we don't have any that I'm aware of...
Feb 14, 2007 02:01 PM|deemurphy|LINK
One of the things I am confused about is what to do with include files. I am not changing the entire site at one time so have to keep the includes, but how do I placed these into my .aspx files. I know how to do validations, etc. The common.asp does alot.
Feb 14, 2007 02:13 PM|deemurphy|LINK
Also do I need the adovbs.inc since I want to do this in visual basic as my scripting code.
Feb 14, 2007 03:06 PM|wisecarver|LINK
I've done a lot of that in classic ASP and know what you are going through right now.
If you are going to specifically use data methods for ASP.NET version 2.0 you should ditch all of the old thinking in favor of Object data sources.
Rather than your common files and includes you'll be making config settings in your web.config, which gets easier, a lot easier.
Will you be using SQL Server 2000/2005 and ASP.NET v2?
If so, you'll really fall in love with the Object Data Sources.
Feb 14, 2007 03:31 PM|deemurphy|LINK
I am building this on my server which has sql 2000 and 2005. The server that they will be using has sql 2000. My problem is this is a government site which can not be taken down and they want the changes done slowly. My first page to work on is a status
page, but we will have to keep the active server pages as well as asp.net page until all this is completed. The status page is a form which gets and puts information in the date base and I also need to do validation on dates.
If I was starting from the being with either I would know a little more where to begin here I do not and need help.
Feb 14, 2007 04:13 PM|wisecarver|LINK
I fully understand that need and your choice of doing small parts at a time is wise.
Something you may want to take a look at is this project where Christian claims you can port your ASP code to asp.net more quickly:
If nothing else it should be helpful as a learning tool.
Feb 15, 2007 10:15 AM|deemurphy|LINK
I really did not see how you code port your asp to asp.net using this tool. There is no documentation. Are there any other tools out there that would work.
Feb 15, 2007 10:58 AM|wisecarver|LINK
I haven't used that, just remembered seeing it, thought I'd pass it on to you just in case it helped.
The one and only tool I've tested for ASP to ASP.NET migration is the ASP.NET Migration Assistant.
As I mentioned it does a pretty good job but for ASP.NET 2.0 I believe you will do better to not use a tool like that at all.
Once you get used to some of the new methods in ASP.NET 2.0 you'll save a lot of time and will have richer control over your old projects.
As an example one of my old ASP v3 SQL Server apps used a ton of connection methods and pages, most with server directives.
To port that over to ASP.NET 2.0 took about an hour and only took creating the connection in the web.config and my Data Source objects.
The population of any dropdown controls turned out not only faster but with a lot less code and resources.
I'm not tyring to confuse you at all, just trying to offer some tips and I still hope to help you with this. [;)]
Feb 15, 2007 01:42 PM|deemurphy|LINK
I downloaded the asp to asp.net migration assistant from this web site. Everything I try to open it, it opens and closes. Is something wrong with my download.
Feb 15, 2007 02:14 PM|wisecarver|LINK
The site seems slow today so there may be something wrong with the one you downloaded.
I just uninstalled my copy, downloaded the latest from here, installed it and ran the aspupgrade.exe on an old project, worked fine.
Feb 15, 2007 02:27 PM|deemurphy|LINK
I noticed that the site is having problems. Is there anywhere else it can be downloaded from. I had to download .Netframework version 1 I already had version 2 and 3, would this cause a problem.
Feb 15, 2007 02:55 PM|deemurphy|LINK
Is there anyway that you can email me you copy of the setup. I just started this job and have nothing to show for it except getting the code they currently have.
Feb 15, 2007 03:14 PM|wisecarver|LINK
I'm not sure I have a legal right to distribute the Migration Assistant...
Could you try to D/L it again?
It's from 2003 and does require the Microsoft .NET Framework 1.1 (version 1.1.4322 or later).
Once you get it installed look at the docs and help file inside the root folder, especially for the way it will treat
include files from ASP.
Feb 15, 2007 03:34 PM|deemurphy|LINK
Could my problem be that I no longer have visual studio 2003. I once had it but built a new system. Can this be used in the express editions and if so how can you access it?
Feb 15, 2007 04:46 PM|wisecarver|LINK
You don't need Visual Studio at all for this, it can be used but I've always done it from a command window.
If you don't have the "Open Command window here" Power toy get it, very handy for this.
Feb 15, 2007 05:43 PM|deemurphy|LINK
Thank you so much that part of it is working. Will this fix the common.asp which is an include file and any other include files?
Feb 15, 2007 05:54 PM|wisecarver|LINK
Glad to see it's working for you now.
As to fixing your common file and the includes, it will probably do about 2/3 of the work for you.
The nice thing is it creates very helpful comments.
You may need to run the entire process again once you learn how it worked, you'll no doubt find a few tricks of your own.
The web.config it created for you should be deleted, my advice anyway, you'll be better off creating a new web.config with your apps settings and connections.
Feb 15, 2007 06:17 PM|deemurphy|LINK
Thank you. I am so very greaful for your patient and help. I think the download orginially worked. I was trying to use it from the program menu bar and doing it that way only opens the app and then closes it.
If I am in need of further help. I hope it is OK to add the this posting.
Feb 15, 2007 06:19 PM|deemurphy|LINK
By the way to run it again, should I run it on the old folder or new folder.
Feb 15, 2007 08:15 PM|wisecarver|LINK
I've got a little trick that helps me with things like that...
Feb 16, 2007 08:22 AM|deemurphy|LINK
I let aspupgrade run all night and it did not finish. I hope I did not make a mistake, but I stopped it this morning and decided to rerun it upgrading what is really needed right now. I did not know that it took so
long to run.
Feb 16, 2007 08:50 AM|wisecarver|LINK
I recommend taking any large parts out for now and attempting to migrate them individually.
Say for example you have a User Forums section, do that by itself, the migration will probably not be very useful for that anyway.
There are some parts which should not be migrated, i.e. Contact pages.
If you're using ASP.NET 2.0 you should create the next contact pages with the specific framework changes in mind.
Same goes for Data connections, they're pretty simply in ASP.NET 2.0 compared to ASP v3, once you get used to them that is. [;)]
Feb 16, 2007 10:08 AM|deemurphy|LINK
How do I view and test the changes. I am using VS 2005 express.
Feb 16, 2007 10:24 AM|wisecarver|LINK
Feb 16, 2007 03:25 PM|deemurphy|LINK
Everything is going fine right now, but may have some questions regarding errors if I can not figure them out. This works great.
Feb 16, 2007 04:16 PM|wisecarver|LINK
Indeed...We all have questions, thus communities like this one...The Framework is gigantic.
Glad to see it's going well however.
Feb 18, 2007 09:28 AM|deemurphy|LINK
One of the things you told me was to delete the web config it creates and to create my own. Can you point me in the direction on documentation for recreating it after migrating.
I am used to it being created as I design the aspx.
Feb 18, 2007 09:59 AM|wisecarver|LINK
That will be good enough, use the new web.config VS will create for you.
Make sure it works at all times during your project migration.
Keep backups and add to that web.config as you make changes/additions.
If you need examples of SQL Connection strings, Ajax, Handlers or any other tips you can always get them here.
Another good resource for working with your new APS.NET project is Google Microsoft:
Feb 18, 2007 09:58 PM|deemurphy|LINK
Right now I am getting the following error message. I think this is from IIS or either a database connection error, not sure which one. I have seem it before in an IIS error:
Line 37: by Microsoft that offers a single logon and core profile services for member sites.Line 38: -->Line 39: <authentication mode="Windows" /> Line 40: Line 41:
OfficeAdmin = False
Dim sServerName As String
Feb 19, 2007 08:01 AM|wisecarver|LINK
For now remove your Authentication section.
Take a look on MSDN and learn a bit about Authentication methods in asp.net, you'll probably want to change to the Forms method later.
Feb 19, 2007 09:42 AM|deemurphy|LINK
I did some reading last night and changed it to forms and that did not work. I removed the authentication=windows and now I am getting the following:
Error 1 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. \web.config 39 I did a rebuild
on the site after removing this.
Feb 19, 2007 10:34 AM|wisecarver|LINK
Don't pull your hair out just yet.
Keep in mind the Migration tool was for version 1.1, many of the errors you will see may be due to the changes in version 2.0
It may help to install some of the newer Starterkits from this site and look at the way they handle authorization and roles.
This blog some time ago appears to address the problem you're having now:
I'm going through something tough right now myself...
My three children are home today, President's day, and my 4 year old daughter asked me to install her new game...
Now I've got Cinderellas Magical Dollhouse installed on my Dev machine. [:$]
Feb 19, 2007 11:07 AM|deemurphy|LINK
Seems like we think alike. I have been viewing the club starter kit web.config because my site it simular to to this one the user has to log on. I had thought about replacing mine with that one.
I will view the blog as well.
I hope you have fun with Cinderella, I always have to deal with Barbie and the Brats.[:)]
Feb 19, 2007 02:55 PM|deemurphy|LINK
I have everything in the web.config working now.
I had made a copy of the status page, which is what they wanted changed first. While doing my dedugging I removed:
5 lines that have
Call LogToFile(SQL, "Log") - I believe this is to write to the SQL log
Feb 19, 2007 03:06 PM|wisecarver|LINK
This is one of the tougher areas I tried to mention as we began this thread.
My suggestion is to not try and re-write those ASP parts at all.
Honestly it will be a lot easier for you if you experiment with, and learn, the new ASP.NET 2.0 data methods.
This site has some very good tutorials, videos, code samples.
Some of these discussions should also be taken to other areas of these forums.
I'm still willing to do what I can to help but this sort of discussion, data methods, is outside the scope of simple replies.
Honestly you'll find some of the new data methods in ASP.NET 2.0 really simple and quick compared to the old one-way server data in ASP.
I'm still a big fan of ASP but am so very much pleased with the changes in ASP.NET 2.0, relieved and pleased. [;)]
Feb 20, 2007 02:17 PM|deemurphy|LINK
Qestion, can you tell me how to reference to the COM based MDAC library?
Feb 20, 2007 02:38 PM|wisecarver|LINK
Say for example you want to pull records from Access using ASP.NET?
This would be the namespace: Imports System.Data.OleDb
An Ole conn: Dim MyConn As OleDbConnection = New OleDbConnection(connectString)
Open the conn: MyConn.Open()
Even with Access I find it a lot easier to do these things from within Visual Studio 2005 Pro via Drag and drop most of the time.
Then I make the necessary changes, once VS has done all the hard work. [;)]
Feb 20, 2007 03:37 PM|deemurphy|LINK
Sorry dumb, but does the namesapce have a certain extension on it like .aspx or .vb or what?
Feb 20, 2007 03:58 PM|wisecarver|LINK
MSDN is the best source of information regarding the Class Library.
System.Data is just a small section of the tree...
btw, Have you been spending time with these? (Awesome series...) http://www.asp.net/learn/dataaccess/default.aspx?tabid=63
Feb 20, 2007 04:53 PM|deemurphy|LINK
I think the last link that you sent me is really going to help me get through some of this. Thanks for your understanding.
Feb 20, 2007 05:53 PM|wisecarver|LINK
Yep, I hope it does help you a bunch.
I can really only offer so much for you here, not as much as if we were sitting there working on that together.
Other than the guys at Siemens I don't get to mix it up with any developers here in Johnson City.
I can however get about 130 Harley riders together for a romp pretty quick. [;)]
Feb 20, 2007 06:13 PM|deemurphy|LINK
Sounds cool but I ride a Honda VTX even through I am a woman.
Feb 21, 2007 12:37 PM|deemurphy|LINK
I found one of my problems. I have SQL 2000 on my system. It is up and running. I also have SQL 2005 and reinstalled it again yesterday. It will not start during installation. I can not get to either SQL servers in visual web developer 2005 express.
I tryied to start the SQL 2005 server by typing netstart.
Feb 21, 2007 06:20 PM|wisecarver|LINK
I don't use any of the Express products, can't really help there.
You might want to post that in the Express forums sections.
btw, the Data Access tutorials have been updated: