How do I get IntelliSense to see ASP 3.0 methods?

Methods like Server.Transfer and Server.Execute are not in Visual InterDev 6.0's IntelliSense (the little drop-down that completes methods and properties for you). Many people have asked why this is, especially when InterDev is installed on Windows 2000 with IIS 5.0 and ASP 3.0 installed.

I will try to explain what is going on, from my limited vantage point. IntelliSense itself gets its information from type libraries; in this case, it is a file with a .tlb extension. Since InterDev 6.0 does not detect which operating system / web server version it is being installed alongside, it ships with ASP 2.0's type library, not ASP 3.0's -- hence the currently missing method names.

So how do you get the new type library to be recognized by Visual InterDev? Is it even possible?


Yes, it is possible; observe the screen shot at left. It includes server.transfer and server.execute.

How did I do it? There are a few hoops to go through...

  1. Ensure that all Visual Studio components are closed.
  2. Go to \Microsoft Visual Studio\Common\IDE\IDE98\.
  3. Rename asp.tlb to asp.tlbak (just in case).
  4. Place this TLB file in that folder.


(Note also that Server.URLPathEncode, an undocumented method, has been removed from the new type library.)

The instructions for creating this TLB file are documented in KB #261101 -- but the methodology behind it requires OLEView and midl.exe to be installed and enabled on your machine. Also, if your machine isn't running ASP 3.0 (e.g. you develop on NT 4.0 and deploy to Windows 2000), you have to copy the new asp.dll to your local machine... I figured it would be easier to just give you the file. :-)

It seems that with the Visual Studio.NET Betas and Windows XP Professional (RTM Build 2600), you don't need to add this type library at all.

Of course, if you are afraid of messing up your system, do not alter your environment. This operation is not officially supported by Microsoft.

0 comments:

Copyright © 2009 - My Gadget Guru - is proudly powered by Blogger
Smashing Magazine - Design Disease - Blog and Web - Dilectio Blogger Template