FIX: Opening ASP Page with ActiveX Control Crashes Visual InterDev 6.0

ID: Q226498


The information in this article applies to:


SYMPTOMS

When opening an Active Server Pages (ASP) page that contains an ActiveX Control in Visual InterDev 6.0, Visual InterDev crashes.


CAUSE

By default, the Visual InterDev 6.0 Source Editor attempts to display ActiveX controls graphically. If the source editor is set to display ActiveX controls graphically, and it encounters ASP script in an <OBJECT> or <PARAM> tag, the editor cannot display the control and will crash. Here's an example:


<object classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" height="1" id="rds" width="1">
	<param NAME="SQL" VALUE="select * from authors">
	<param NAME="Connect" VALUE="DSN=pubs;">
	<param NAME="Server" VALUE="http://<% = Request.ServerVariables("SERVER_NAME") %>">
</object> 


RESOLUTION

Install Visual Studio 6.0 Service Pack 3.

-or-
Open the ASP page in Notepad (or some other text editor) and insert the keyword VIEWASTEXT in the <OBJECT> tag of the ActiveX control. This will cause the control to always be displayed as text, but will allow you to view other ActiveX Controls graphically. For example, using the previous code, this would look similar to the following:

<object VIEWASTEXT classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" height="1" id="rds" width="1">
	<param NAME="SQL" VALUE="select * from authors">
	<param NAME="Connect" VALUE="DSN=pubs;">
	<param NAME="Server" VALUE="http://<% = Request.ServerVariables("SERVER_NAME") %>">
</object> 


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

Q194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed


MORE INFORMATION

Steps to Reproduce Behavior

First, ensure that Visual InterDev is configured to display controls graphically by default, then do the following:
  1. Create a new ASP page in Visual InterDev.


  2. Paste the following code in the page:


  3. 
    <object classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" height="1" id="rds" width="1">
    	<param NAME="SQL" VALUE="select * from authors">
    	<param NAME="Connect" VALUE="DSN=pubs;">
    	<param NAME="Server" VALUE="http://<% = Request.ServerVariables("SERVER_NAME") %>"> 
  4. Save the ASP page and re-open the page in Visual InterDev.


Additional query words:


Keywords          : kbservicepack kbVS600sp2 kbVS600SP1 kbVS600sp3 kbVS600sp3fix 
Version           : WINDOWS:6.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 19, 1999