I need to rebuild my workstation soon. I also need to continue to maintain a number
of sites that were built using classic ASP. Thinking that it would be
ridiculous for me to install Visual Studio 6 as well as Visual Studio.NET on my nice new
workstation, I've set out to determine how I can best use Visual Studio.NET to manage my
existing classic ASP sites. I've come up with a couple helpful tips
and thought I'd share what I've found. At the same time, I'm also asking anyone who has
any additional tips to come forward and share them so I can post them for the benefit
of everyone else stuck managing legacy sites.
Note: There is no reason that you can't install Visual Studio 6
and Visual Studio.NET side by side on the same computer. This is the
configuration that I've been running for a long time now and it does work fine.
Since I'm rebuilding anyway, I'm taking the opportunity to try and keep my machine
as un-cluttered as possible and try and get myself working in a single development
environment. It may or may not work (we'll see) and it may not be the best approach
for you, but if it's something you'd like to try, I hope these tips come in handy.
There were three main issues I had to immediately resolve before I could even consider
using VS.NET to manage my classic ASP projects. This is where these first tips came from so
I thought I would start there.
Being able to work in the root of a web site
Being able to see the files on the server without having to add them one at a time to the projects
Being able to connect to a site without mucking it completely up with VS.NET's supporting files
Working in the Root of a Web Site
When did working in the root of a web site become a bad thing? VS.NET seems
determined to keep us working in subdirectories. Since VS.NET came out I've seen
more and more sites having home pages at something like:
for no apparent reason other then the fact that the developer used VS.NET to build it.
Don't get me wrong... it's not like you can't go to the root of these sites, but you
inevitably get redirected to the subdirectory in question. Who does that help?
Certainly not visitors... they get another redirect to wait for (I was on a
sloooooooowwwwwww dial-up last week... you can actually notice these things at 28.8!)
and the server now has to waste CPU cycles to process all the extra redirects.
But the developer could use Server.Transfer to make things quicker... true, but not
without having to worry about all the relative links in the site. What about
sending someone a URL... every one on the site now just got even longer... are your
links too short? Half the links I get sent via email wrap as it is....
but enough rambling... I'm sure you get the point.
Directories are a good thing, but
adding them for no reason is not.
I set out to find out how to work in the root of a site in VS.NET. This is
apparently no small feat... try it... I spent 20 minutes dealing with the
various New and Open dialog boxes before I finally gave up.
The New Project dialog box wouldn't let me put an "Empty Web Project" in the root
(the OK button gets greyed out) and the "New Project in Existing Folder" doesn't
let you enter a URL (the location box goes grey). How was I to know if I just gave
it a name and said OK that it would then prompt me for a location? Who the hell
thought this up... I'm sure some genius said:
"Let's put a location box on the form,
not let them use it, and then on the next screen we'll ask them for a location.
Hey, it'll be more like a wizard and how can that be bad?"
This was the next problem... once I finally got connected to my site, I could only see
files that VS.NET thought were part of the project. To see anything that it
hadn't created I found myself right-clicking on the project choosing Add ->
Add Existing Item... and then selecting the file(s) in question.
This works well until you've got a large site with hundreds (or more) files
spread over a dozen (or more) directories. There had to be a better way.
Luckily this one was easy. It took me a while, but I finally saw it.
In the Project menu there's an option: Show All Files.
I later realized the button is also at the top of the Solution Explorer window,
but either way you enable it, it allows you to see all the files in your site...
not just the ones VS.NET thinks is important.
Connecting to a Site Cleanly
If you haven't used VS.NET you may not know what I'm talking about by that so I'll explain.
Visual Studio 6 liked to add it's little library of scripts to any site it connected to, but
if you weren't going to use them it gave you the option not to add them. Aside from that it
did very little to a site that you connected to. VS.NET, on the other hand creates a number
of files whenever you create a new project. Luckily Microsoft included a couple ways around it:
"Empty Web Project" and "New Project in Existing Folder." Both of
these will create a project without creating all the stuff that gets automatically
included when you select "ASP.NET Web Application." It'll still create two
project files, but aside from that your site should escape pretty much unscathed.
Those were my main issues and so that's what I've got so far...
there will be more coming as I spend more time using VS.NET for classic ASP
coding and as you....
Share Your Tips
I realize that there's a lot more to working with classic ASP in VS.NET then I've covered, but,
as I said, I'm just starting to actually use VS.NET for my classic ASP work. So... to help me
and our readers along and get your name "up in lights" at the same time, I'm asking that
if you've got a tip or trick that you find helpful, please
e-mail it to me
and I'll get it published so that everyone can give it a try.
Update: Visual Studio (not .NET) on Windows XP
For those who care, here's a quick update... my mission has failed... I'm now running VID 6 on XP Pro.
I finally bit the bullet and spent a weekend installing my new hardware:
Adaptec 39160 SCSI controller
I got this in a Dell server deal... the whole server cost me less then this card lists for.
I pulled the controller and drive, installed a small IDE drive I had lying around and my Mom couldn't
be happier. Granted a PowerEdge 600SC is a little overkill for email and web browsing, but it was
basically free and has been hassle free (except for finding a sound card for the damn 3.3
volt only PCI slots).
Maxtor Atlas 10K IV 36GB hard drive
I know 36GB is small, but I've got the WD Special Edition 120GB IDE for storage. The Maxtor is strictly for Windows and apps... no MP3 files whatsoever. ;)
Apple 22" Cinema Display
It's not the nicest monitor in the world, but it's damn close... I got a used one off a friend for a steal.
ATI's All-In-Wonder Radeon 7500
It's the one with the RF remote. Actually it's quite a bargain if you'll ever use any of it's features.
I liked my old Radeon 64MB DDR VIVO card (top of the line when I bought it), but it doesn't have a DVI port
and I couldn't in good conscience install a 22" LCD and not use the DVI connector (even if the Apple
did support the 15-pin VGA connector... which it doesn't.)
Apple's DVI to ADC Adapter
Strictly speaking the Apple monitor doesn't support DVI either... at least not until you spend $100 on the adapter!
Anyway... with all the new hardware I could hardly justify re-installing Windows 2000
so I dug up a copy of XP Pro I had lying around and have finally moved into the world of Windows XP.
I half like it. I half don't. I guess time will tell, but after a couple attempts to wrangle
VS.NET into working the way I wanted it to I decided there was no choice but to install Visual Interdev 6.0 (VID) as well.
So this is the section devoted to using VID on XP.
Getting Logins to Match
It's been so long since I've had to type in a user name and password in VID I found it extremely annoying
to have to do it everytime I fired off VID to make a small change. It's not really VID's fault. XP's got this whole
friendly name thing going on so my login was now "John Peterson" which obviously doesn't match my
username on our Win2k Server.
Note: Do not try this if you are on a domain and/or are not sure of what you're doing.
Your sys admin will not like it! Also note that your username and password obviously
need to match between your local machine and your server. Neither of these are a big concern for me.
I manage my home network and have always sync-ed the passwords with the ones from our server because if
I had to remember another set of passwords, I'm pretty sure my brain would start to leak out of my ears or my
head would explode.
It took me some looking, but I found it. Forget that new "User Accounts"
control panel icon... fire off "Computer Management" from "Administrative Tools"... open
"Local Users and Groups"... open your account under the "Users" folder... type the name
XP is using as the "Name" into the "Full Name" field and click "OK". Then rename
the account to your Win2k-style username. I haven't found any negative side effects... XP doesn't seem to
know the difference (I can still log into XP using "John Peterson"), but now VID and my servers
realize I'm me again without me having to continually tell them!
Please keep sending in any tips you've got for using VID6 on XP or for using Classic ASP in VS.NET... see the
Share Your Tips section above for the address. I'm determined to be
able to develop in both ASP and ASP.NET at the same time. I'd like to be able to do it from 1 IDE, but
if that's not possible...