Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2010 Classic ASP support

With Visual Studio 2005, 2008, and 2010 you can debug Classic ASP by attaching the debugger to the w3wp.exe process. This is very buggy and crashes often in 2005 and 2008, but works well in 2010. The only problem is that, as far as I can tell, VS2010 does not support Classic ASP code highlighting or code completion. HTML looks fine, but any Classic ASP code is just plain black-on-white.

I can't add <%@Script="VBScript"%> to the top of each page because of the site architecture, and even after testing that - it doesn't do anything.

This whole issue is highly confusing because with Visual Studio 2010 Express, the aforementioned Classic ASP support comes out of the box (minus debugging).

I can get alternating HTML and VBScript highlighting by switching between the following modes (but never both). I have tried the following: Tools > Options > Text Editor > File Extensions > Adding an "ASP" extension with the following Editors:

  • Automatic Editor Selector (XML) - gets the HTML right, but no dice on the ASP
  • Microsoft Visual Basic - gets the ASP mostly right (lots of underlined errors even though code is up to ASP standard), but no HTML highlighting
  • Script Editor - HTML but no ASP
  • Web Form Editor - HTML but no ASP

I have considered extending the Editor, my thoughts being to try and mix the markup for the Web Form Editor and the Microsoft Visual Basic editor, but am unsure if this is a reasonable course of action.

How can I get code highlighting and intellisense for Classic ASP in Visual Studio 2010?

like image 617
MikeMurko Avatar asked Jan 15 '12 19:01

MikeMurko


People also ask

Is ASP classic still supported?

The use of ASP pages with Microsoft Internet Information Services (IIS) is currently supported in all supported versions of IIS. IIS is included in Windows operating systems.

Does Visual Studio support Classic ASP?

Most versions of Visual Studio support editing Classic ASP code, couple of things to keep in mind though. Frontpage Server Extensions is no longer supported, the best approach is to use a mapped drive or better yet store the code in source control (Git, SVN etc.)

Is Classic ASP deprecated?

The answer is clearly "Yes, Classic ASP is supported, and No, it will not disappear". To convince you, with each new version of Windows Server, Microsoft indicates a total support of the ASP platform throughout the lifecycle of Windows Server, i.e. at least 10 years from its release.

How do I run ASP Classic on Windows?

Click Start, and then click Control Panel. In Control Panel, click Programs and Features, and then click Turn Windows Features on or off. Expand Internet Information Services, then World Wide Web Services, then Application Development Features. Select ASP, and then click OK.


1 Answers

Solved!

TL;dr: Install Service Pack 1

Walk you through the troubleshooting process:

  • Uninstalled VS2010 Ultimate completely on machine with problems
  • Installed VS2010 Professional as per comments. This did not solve the issue. Same problems as before.
  • On a new computer with a fresh install of Windows 7 I installed VS2010 Professional.
  • This time it asked me to install Service Pack 1 after installing (http://www.microsoft.com/download/en/confirmation.aspx?id=23691).
  • Went into the asp code and it was highlighting and code suggesting perfectly. Debugging worked flawlessly as well.
  • Returned to original (faulty) computer and manually installed SP1 and the problem went away.
like image 85
MikeMurko Avatar answered Oct 26 '22 12:10

MikeMurko