Share via


Visual InterDev

While working in Microsoft® Visual InterDev™, you may encounter unexpected behavior or results. You can use the following summary of common issues and concerns to understand Visual InterDev's features more fully and get the results you want. The major areas covered are:

  • Web Projects

  • Databases

  • Editing and Scripting

  • Debugging

Web Projects

This section covers issues with files, diagrams, site navigation, builds, and Microsoft® Internet Information Server (IIS).

Working with Solutions and Projects

Typically, when you first create a project, you automatically create a solution with the same name. After you have created a solution, you can add additional projects. If you do not want the initial project and the solution to have the same name, you can rename the solution after it is created.

To rename a solution

  1. In the Project Explorer, select the solution.

  2. From the File menu, choose Rename.

  3. In the Project Explorer, enter the new name for the solution.

  4. The solution file (.sln) has the new name and the Web project file (.vip) remains the same.

Authentication Error Occurs During Creation or Copying of a Web Application

You may encounter an authentication error if you are entering the number for the IP address instead of the computer name when you specify a server for a Web application.

If your computer uses a proxy server only for external addresses, this error occurs because the system attempted to access the IP address through the proxy server even though it is actually a local or an intranet address.

You can avoid this error by performing one of following tasks:

  • Use the computer name instead of the number for the IP address when creating a project or copying a Web application.

  • If your Web project is not using the system Internet settings, change the proxy options for your Web project by including the number for the IP address in the List of hosts without proxy in the Web Project option settings.

  • Change the system Internet settings by including the number for the IP address in the List of hosts without proxy in the Internet properties for the operating system.

For more information about specifying the list of hosts, see Connecting to a Proxy Server.

Adding Personal Files to a Project

If your project has personal files in it, you can update the master Web application to include those files. If you are trying to update the master by selecting multiple files in the Project Explorer, select only the personal files. If you include other files that already exist on the Master server, the Add to Master command is not available.

If someone removes master files using Microsoft® Windows® Explorer or some way other than through the Visual InterDev project, the file will appear as a personal file in your project. When you refresh your project, you will be prompted to delete the file from your local Web application as well. If you want to recover the file, you need to choose "No." Use the Add to Master command to include the file in the Web application.

For more information, see Working Locally, Updating the Master Web Application, and Synchronizing Master and Local Files.

Site Diagram Issues

  • In local mode, if you add a new file to a site diagram and then save the site diagram, Site Designer automatically adds the new pages to the master Web application on the master Web server.

    For more information about using site diagrams in local mode, see Visual InterDev Modes in Site Designer.

  • In local mode, if you add a personal file to a site diagram and then save the site diagram, Site Designer automatically adds the personal file to the master Web application on the master Web server.

    For more information about using site diagrams in local mode, see Visual InterDev Modes in Site Designer.

  • Netscape Navigator and Netscape Communicator versions 4.0 through 4.03 implement cascading style sheets (CSS) differently than Microsoft® Internet Explorer. Navigator and Communicator interpret relative URLs as relative to the document rather than to the linked .css file. To fix this:

    • Copy, but do not move, all of the images from the directory of the theme that you are using to the directory that contains the document that references the .css file.

      -or-

      Change the relative URLs in your CSS files to the appropriate absolute URLs.

  • The PageNavbar design-time control (DTC) allows you to use custom HTML to generate navigation bar links for your Web pages. If you use custom HTML for navigation bar links, you must set the Orientation property to horizontal to specify a custom orientation for the navigation bar on the page.

    For more information about the PageNavbar DTC, see PageNavbar Design-Time Control.

  • The text [FrontPage VINavbar Component] appears in place of navigation bar links if you do not have the proper server components installed on both your local machine and the master Web server. To use the PageNavbar control, you must have the VINavbar component installed on your local machine and on the master Web server. The VINavbar component is installed with the Microsoft® FrontPage® 98 server extensions.

    To verify that the VINavbar component is installed

    • On your local machine, search for the vinavbar folder. The vinavbar folder is installed by default in drive:\Program Files\Microsoft FrontPage\version3.0\bots\.

    If you cannot find the vinavbar folder on your local machine, you must install the FrontPage 98 Server Extensions. See the Visual InterDev Readme file, Readmevi.htm, for installation instructions.

    After you have installed the FrontPage 98 Server Extensions, you must recalculate links on your Web project.

    To recalculate links for a Web project.

    1. In the Project Explorer, right-click the root of the project.

    2. From the shortcut menu, choose Recalculate Links.

    For more information, see PageNavbar Design-Time Control.

  • The Layout design-time control (DTC) header and footer text indicates where you should add content in a page that has a layout applied to it. In the actual layout template file, Layout.htm, the Layout DTC header and footer text means the opposite.

    For more information about the Layout DTC, see Layout Header and Footer Controls.

  • Changes made in site diagrams or the PageNavbar control may not immediately appear on the navigation bars when you preview your pages. To fix this:

    • From the Project menu, choose Web Project and then choose Recalculate Links.

    The Recalculate Links command updates the navigation bar with the latest navigation structure information.

Note   Changes made in site diagrams or the PageNavbar control may also not immediately appear on the navigation bars if you have unselected the Always update navigation structure information on local Web server option on the General Tab (Project Properties Dialog Box).

  • If you customize a theme file, such as a .css file, and later apply a theme from FrontPage, your customizations may be discarded. To prevent this:
    1. Rename the theme folder containing the customized theme files in the _Themes directory. For example, if you are using the Nature theme, rename the Nature folder to MyTheme.

    2. Rename the .inf file for the customized theme. For example, rename Nature.inf to MyTheme.inf.

    3. In the renamed .inf file, change the title= text to the new theme folder name. For example, change title=Nature to title=MyTheme.

    4. Reapply the theme to all the pages previously using the customized theme.

  • If you specify a parameter or bookmark in the URL for an HTML page in a site diagram, the PageNavbar control will not generate navigation bar links for the .htm file. The PageNavbar control does not support parameters or bookmarks in the URL for .htm files. To prevent this:
    • If you have specified a parameter, create a new .asp file in the Project Explorer. Remove the .htm file from the site diagram and add the new .asp file using the Add Existing File command to specify the parameter for the .asp file.

      For more information, see Adding Pages to a Site Diagram.

    • If you have specified a bookmark, create an .asp file with a parameter that redirects the browser to the bookmark in the .htm file. Remove the .htm file from the site diagram and add the new .asp file.

  • In local mode, Link View displays link information for your Web project as if you have already updated the master Web server with your changes. The link diagram may therefore display link status that conflicts with the actual status of the Web application. For more information, see Visual InterDev Modes in Link View.

Note   In local mode, Link View may not immediately display changes to the link information in your files if you have unselected the Always update navigation structure information on local Web server option on the General Tab (Project Properties Dialog Box).

  • If you attempt to view links for items contained in directories that start with the underscore character _, such as _myfiles, the items may appear broken, the items may not display the proper in links and out links, or the items will not appear in the diagram. To avoid this, do not create directories that use an underscore character _ as the first character in its name.

Caution   By default, Visual InterDev creates four directories that use an underscore character as the first character in its name: _Layouts, _private, _ScriptLibrary, and _Themes. Do not rename these directories.

  • When you create a link diagram using the View Links command, you create a design-time view of your links. Dynamically generated links, such as links generated by ASP script or from a database, do not appear. To view dynamically generated links, use the View Links on WWW command and enter the full URL for the file. The View Links on WWW command provides a run-time view of the links in a Web application.

    For more information, see Link Verification.

  • For best results, you should recalculate the links for the Web project before you run the Broken Links Report. Recalculating links ensures that you have the most current link information for the Broken Links Report. For more information, see Repairing Links.

  • If you have created a directory that starts with the underscore character _, such as _myfiles, files contained in these directories may be excluded from the Broken Links Report or may be listed as unused in the Broken Links Report. To fix this, rename the directory so that it does not use an underscore character_ as the first character in its name.

Unable to Connect Remotely to Windows 95 or Windows 98 Web Server

Microsoft® Windows® 95 and Windows® 98 support the Web servers installed with FrontPage or the Windows NT® Option Pack. These Web servers are intended for local development. If you want to use a machine as a remote Web server, install Windows NT Server and the Windows NT Option Pack which includes Microsoft® Internet Information Server.

IIS Administration Operations Fail with MTS Installed

Attempts to perform Web administration operations, such as setting application roots, when no user is logged on the Web server will fail under the following circumstances:

  • If you are using Microsoft® Transaction Server (MTS)

    -and-

  • If during installation of MTS, you accepted the default option, Interactive User, as the option to run MTS sessions.

To set "allow Web administration operations" without someone logged onto the server

  1. Open the Microsoft Master Console for the server.

    Note   To open the Microsoft Master Console: From the Start menu, choose Windows NT 4.0 Option Pack, Microsoft Internet Information Server, and then Internet Service Manager.

  2. Expand Microsoft Transaction Server.

  3. Expand Computers.

  4. Expand My Computer.

  5. Expand Packages Installed.

  6. Right-click System and from the shortcut menu, choose Properties.

  7. On the Identity tab, choose a user that has administration privileges on the server.

  8. Close the Microsoft Master Console.

For more information, see the documentation for Internet Information Server or Microsoft Transaction Server.

Build Order and Visual InterDev Projects

If you include your Web project in the Build Order dialog box, the project is automatically added to the end of the list so that it is built last. Visual InterDev projects must be built last. If you manually move the Visual InterDev project up in the list, your build may fail.

Visual SourceSafe Explorer and Visual InterDev

When using Visual SourceSafe with Visual InterDev, use the Visual SourceSafe Explorer only to view history or to rollback to a previous version. If you use the Visual SourceSafe Explorer to set options for checking files in and out, you may get unexpected results.

For example, you can set an option in Visual SourceSafe Explorer to remove local copies of a file on check in. If you choose that option, Visual SourceSafe considers the master copy to be the local copy and will remove that file from the Web server.

If you want to remove local copies after checking them in, use the options available from within Visual InterDev.

To remove local copies

  1. From the Tools menu, choose Options.

  2. In the Options dialog box, choose Projects and then Web Projects.

  3. In the Project Options area, select Remove local copies when checking in files.

  4. Choose OK.

Databases

This section covers issues with connecting to databases through ODBC, data binding and Recordset controls.

Data Binding

If you want your Web page to display data from a database, you must place a Recordset design-time control on the page, and set its properties to display a set of records from a database to which you've made a data connection. For more information, see Data Binding.

Using Quoted Identifiers

If you are using an ODBC driver to create a data connection to a SQL Server database, you specify information for the connection in the Create a New Data Source to SQL Server wizard. One of the options in this wizard (on the page containing the prompt Change the default database to)is a Use ANSI quoted identifiers check box. This option is on by default. If you turn this option off and have database object names containing quotes, problems will arise. If the identifiers you use for database objects may contain quotes, make sure to leave this option on.

However, if you select this option, you could have unexpected results when dealing directly with database objects such as stored procedure or trigger code. If you select this option, be careful how you use strings in your script. It might be a good idea to use single quotes (') when possible.

Tooltips Show Errors for Recordset, PageObject, and FormManager Design-Time Controls

If you have an error in a Recordset, PageObject, or FormManager design-time control while you're designing it, you can use the mouse pointer to display a Tooltip describing the error.

The Tooltip is displayed when you move the mouse pointer over the control in Design view, over the fields in its property pages, or over the property fields displayed on the face of the Recordset control.

For example, if you create a row in the Actions Performed Before Transition table on the Action tab of the FormManager control's property pages, but don't fill in values for all the fields in this row, you'll generate an error for the control. This error ("Errors were found in the 'Action' property page of this DTC") will be displayed in a Tooltip if you move the mouse pointer over the FormManager control in Design view.

Exclamation Point Appears on Recordset Control

When you see on a Recordset design-time control (DTC), it means there is a data problem. Select the Recordset DTC so that it has the focus, and then move the mouse over the and Visual InterDev will display a Tooltip that explains the problem.

Some typical causes are:

  • The appears in the Object Name list box when you change the Connection or Database Object setting. If you change the connection or database object, select a new object name.

  • The appears to the left of the Recordset name at the top left of the DTC when there's a problem with the data connection. Areas to investigate include:

    • Whether a connection can be made to the database server.

    • The data connection in the DataEnvironment under the Global.asa file in the Project Explorer.

    • The connection on the General tab of the Recordset Design-Time Control Property Pages dialog box.

Name of Recordset Appears as Red on DTC's Property Page

You bind data to a data-bound design-time control by setting the DTC's Recordset property to one of the Recordset DTCs that exists on the same page. If you set a data-bound DTC's Recordset property to an existing Recordset DTC, and then delete that same Recordset DTC from the page, the name of the deleted Recordset will appear in red on the General property page of the data-bound DTC.

To fix the problem, you must either add a Recordset DTC to the page that uses the same name as the deleted Recordset DTC, or change the setting of the data-bound DTC's Recordset property to an existing Recordset DTC.

Errors when Moving Quickly Through Database Records

If you are working with an ASP page containing a data-bound form and try to navigate quickly from one record to the next, you might see the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e21'

This error results from an attempt to get the next record before the previous database request has completed. You can avoid this error by buffering the page containing the form, so that it does not display in the browser until the data has been completely fetched and the page composed. To set buffering, add the following command to the top of the page:

<% Response.Buffering=true %>

Editing and Scripting

This section covers issues with using the HTML editor, design-time controls, and other controls.

Enabling the Scripting Object Model

Design-time controls function properly only if the scripting object model is enabled for the page on which they appear. If you drag a design-time control onto a page that doesn't already have the scripting object model enabled, a message box prompts you to add it. However, if you choose "No" and proceed, the control will not communicate with other controls on the page, and it will not display properly at run time. For details, see The Scripting Object Model.

Scripting with Design-Time Controls and Script Objects

When writing script to interact with script objects created by design-time controls, keep the following tips in mind:

  • While scripting, press CTRL+J at any time to display the statement completion drop-down list. If you are in the context of a particular object, that object's properties, methods, and events are included in the list. If you are not in an object context (for example, you are on a blank line), the drop-down list contains a complete list of objects and their members.

  • Treat the names of properties, methods, and events as case sensitive even if you are scripting in VBScript. In many cases, the names you use are evaluated by the scripting object model framework (which is largely in JavaScript), and are therefore case sensitive.

    ****Tip   ****When you are working with JavaScript, statement completion will not recognize an object unless you have used correct capitalization.

  • When you are working on an ASP page with the scripting object model enabled, you can refer to the current page using the object thisPage. If there is a PageObject design-time control on the page, the object thisPage appears in the Script Outline window and is available for statement completion. If there is no PageObject control on the page, you can still use the thisPage object in your scripts, but it will not be visible in the Script Outline window or available for statement completion.

    In client script, the object thisPage is available only if you have a page object on the page. But in client script, you use the thisPage object only for accessing the properties and methods for page objects. For properties, methods, and events of the current page in client script, you can use the DHTML document object.

  • When working with the names of methods and functions, you must be careful to use parentheses correctly. If you use statement completion to write method calls, parentheses are not added to method calls.

    If you are scripting in JavaScript, you must provide parentheses if the method is being executed as a function, if the method call returns a value, or if the method returns an object reference. The following two examples illustrate this use:

    str = Textbox1.value()   // returns a value
    // In the following getPagingNavbar() returns an object,
    // and hide() executes a function
    Grid1.getPagingNavbar().hide()
    

    If you do not include parentheses, the method call is treated as a function pointer, which is used to pass the name of a function as a parameter. For example, if you call an object's advise method, you pass the second parameter (the function name parameter) as a function pointer without parentheses, as in the following example:

    <SCRIPT LANGUAGE="JavaScript">
    function setAdviseMethods(){
       Btn1.advise("onmouseover", changecaption);  //no (), function ptr
    }
    </SCRIPT>
    

    If you are working with VBScript, you must provide parentheses if the method call returns a value; otherwise, they are optional. For example, in VBScript, both of the following statements will work:

    Textbox1.hide()
    Textbox1.hide
    

    Be careful to include parentheses when invoking a method that returns an object reference, as in the following example:

    Grid1.getPagingNavbar().hide
    

    If you call an object's advise method in VBScript, you pass the name of the second parameter (the function name parameter) as a string, including the parentheses:

    <SCRIPT LANGUAGE="VBScript">
    Function setAdviseMethods()
       Btn1.advise("onmouseover", "changecaption()") ' note quotes and ()
    End function
    </SCRIPT>
    

    ****Tip   ****Remember that because the scripting object model uses JavaScript, you should treat method names as case sensitive, even in VBScript.

Using the Properties Window

The Properties window uses a grid to display all properties for the selected control or object. The following lists some tips for using the Properties window:

  • Check the selection. The drop-down list at the top of the window displays the current element's type. If you are not seeing the properties you expect, check this. In a few cases (such as when you are working with HTML table elements), the list displays a hierarchy of elements that you can use to select the correct one.

  • Categorize properties. Buttons at the top of the window allow you to display properties alphabetically or by category. Grouping properties by category makes it easier to find properties, such as inline style attributes.

  • Use the Custom option. Some elements, such as design-time controls, provide custom property pages that make it easier to set property values. If a custom property page is available, the (Custom) property appears first in the alphabetical list, and you can click the button in the text box for that entry to display the window.

  • Use Help. Help is provided for most individual properties. To see Help, select the property in the grid, and then press F1.

Previewing with the Quick View Tab

The tab of the HTML editor processes only the client portions of a page: HTML text and client scripts. Although you can preview .asp files in Quick view, the editor does not perform a round trip to the server, therefore:

  • No server script is executed.

  • Design-time controls whose target platform is Server will not appear.

Cutting and Pasting HTML Text

When you cut or copy text to the Windows® Clipboard from an HTML source — such as Microsoft® Internet Explorer, Design view of the Visual InterDev editor, or the Visual InterDev Help system or sample applications — two versions of the text become available: an HTML version and a text version.

The HTML version uses HTML escape sequences for reserved characters such as <, >, and quotation marks. For example, if you copied "<MARQUEE>" to the Clipboard, the HTML version would be "&lt;MARQUEE&gt;". The text version contains an exact copy of the original text you cut or copied.

When you paste, you can choose either version. To paste the HTML version, choose Paste from the View menu or the right-click menu. To paste the text version, choose Paste as HTML from the right-click menu. In general:

  • In Design view, choose Paste if you want to see the actual text such as "<MARQUEE>". Choose Paste As HTML if you want to create the tag. Tags do not appear in Design view, so the text you see might not appear to be the same as what you cut from another source.

  • In Source view, choose Paste as HTML.

Cutting or Copying in Design View of the HTML Editor

If you cut or copy an element from Design view to the Windows Clipboard, it contains additional information used to manage that element. If you paste the element anywhere but in Design view, it might be pasted with an extra <DESIGNTIMEP> tag in it. Always check the results of a paste operation if the source was Design view.

Distinguishing Design-Time Controls and HTML Controls

Be careful to distinguish design-time controls and HTML controls on the Toolbox. The controls have similar names — for example, there are text boxes and buttons on both tabs. It can be particularly difficult to distinguish the controls when working in Design view, because HTML controls are displayed graphically there.

You will find it easier to distinguish them in Source view. There, HTML controls are displayed as simple HTML tags such as <BUTTON> or <INPUT>. Design-time controls are displayed either graphically or as <OBJECT> tags with additional information.

Working with Text View in Source View

You can view controls (design-time controls, Java applets, and other controls) in Source view as text, which is useful when you want to see the exact contents of a page, and for making changes quickly to a series of controls. The following tips will help you when working with text view.

  • Viewing a control as text applies only in Source view. Design view and Quick view always render the graphical view of a control (if possible).

  • You can set the default view for controls using the HTML tab in the dialog box.

  • You can select text view for an individual control by right-clicking it, and then choosing Always View As Text. When you do, the VIEWASTEXT attribute is added to the control's <OBJECT> tag.

  • You can also choose the View Controls As Text on the View menu to temporarily view controls in text view. You can then use the View Controls Graphically command to redisplay controls graphically (except those whose <OBJECT> tag contains the VIEWASTEXT attribute).

  • If you choose Refresh from the View menu, the editor displays all controls in the current default view (as set in the Options dialog box) except those whose object tag contains the VIEWASTEXT attribute.

Using text view can affect how controls work on your page. Visual InterDev design-time controls do not function properly if they are displayed as text, because they cannot communicate with the scripting object model framework. Before you add a design-time control to a page, make sure that you have set options to view controls graphically. If you do inadvertently add a control to the page while the text view option is set, the HTML editor cannot create an instance of the control. You will see only the HTML <OBJECT> tag for the control, not the control itself.

Printing Pages Containing Design-Time Controls

When you print a page in the HTML editor, some design-time controls might not be displayed with the values you set. If you put more than one instance of a design-time control on a page — for example, if you put multiple Textbox or Button controls on a page — the second and subsequent ones will display their default values in the printout.

Creating Controls Inside Script Blocks

Do not drag controls — design-time controls, ActiveX® controls, or any other objects — into a <SCRIPT> block in Source view. A <SCRIPT> block is always assumed to contain only script, so the editor does not parse for controls, and therefore cannot create instances of them inside the block.

If you do drop a control into a <SCRIPT> block, the editor creates an <OBJECT> block containing information about the control such as its class ID. However, no additional information is created, such as parameters or script, so the control cannot be instantiated and will not function correctly.

Non-Functional ActiveX Controls on the Toolbox

In some instances, you might see controls listed on the Toolbox ActiveX® Controls tab that are not available. For example, you might see the options WalletAddress and WalletPayment on the Toolbox, but when you try to drag them onto a page, an error is displayed such as "can't show control graphically."

This can occur if you are working in Microsoft® Windows NT® and chose the "Browser Only" option when installing Microsoft® Internet Explorer 4.0. This minimal installation does not copy the controls to your computer, so they are not available. However, a Windows registry entry for the control is created, so it appears on the Toolbox.

Using Server Objects from the Toolbox

The Server tab of the Visual InterDev Toolbox lists a number of objects that are commonly available on Microsoft® Internet Information Server (IIS). These server objects are part of IIS, but are used heavily in ASP pages as part of Web solutions built in Visual InterDev. For example, Visual InterDev developers frequently create server-based database access using ActiveX® Data Objects (ADO).

The list on the Server Objects tab is predefined — it is not constructed based on objects that are actually installed on a particular server. This allows the Toolbox to display the same list no matter what server you are working with at the moment. However, it also means that it is possible to add a control from the Toolbox to an ASP page that might not be available on the server when the page is run. You should always test pages with server objects on the production server.

To use server objects, drag them from the Toolbox onto your Web page. (Do not drag them into <SCRIPT> blocks.) When you do, the editor creates an <OBJECT> block with the correct RUNAT and PROGID attributes, and with an ID attribute. Some of the objects created this way require additional information that you typically supply using <PARAMETER> tags inside the <OBJECT> block.

When the page runs, the server creates an instance of the object in the <OBJECT> block. You can reference the object in your script using the object's ID. For example, if you drag a Browser Capabilities object onto your page, the editor creates an object tag that looks like this:

<OBJECT RUNAT=server PROGID=MSWC.BrowserType id=OBJECT1></OBJECT>

Tip   Change the object's ID to something meaningful. For example, in this case you might change it to oBType.

After the object has been instantiated with the <OBJECT> block, you can reference it in your script using its ID. The following excerpt from a page shows how you might use the object created above:

Your browser is <%=oBType.browser%>, version <%=oBType.version%>.
<p>
Your browser supports these programming languages:
<UL>
<%If oBType.javascript Then%>
   <LI>JavaScript</LI>
<% End If %>
<%If oBType.VBScript Then%>
   <LI>VBScript</LI>
<% End If %>
</UL>

Note   If the object you are working with is available on the computer where Visual InterDev is installed, you will get statement completion for the object's properties, methods, and events when you are scripting. For example, if Visual InterDev is running on the same computer as IIS, Visual InterDev has access to the objects on the Server Objects tab.

You can find information about using server objects and about individual objects in the Microsoft Developer Network and elsewhere, as listed in the following table.

Note   Some of the paths listed in the following table might not be available in the Visual InterDev subset of MSDN. If you cannot find the path, choose the subset called "(Entire Collection").

For information about See this location in MSDN
Using server objects Tools and Technologies
 Active Server Pages
  Using Scripting Languages
   Using Components and Objects
ADO Command
ADO Connection
ADO Recordset

Note   Server ADO objects are not part of the Visual InterDev data-binding model. To bind Visual InterDev design-time controls to a database, use the Recordset design-time control.

Platform SDK
 Data Access Services
  Microsoft Data Access 2.5 SDK
   Microsoft ActiveX Data Objects (ADO)
Dictionary
FileSystem
Platform SDK
 Tools and Languages
  Scripting
   JScript (OR VBScript) Language Reference
    Objects
Ad Rotator
Browser Capabilities
Content Linking
MyInfo
Tools and Technologies
 Active Server Pages
  Using Scripting Languages
   ActiveX Components

See also Creating Portable Script. For an example using the Ad Rotator object, see the Random Ad Sample.

CDO NTS objects Platform SDK
 Messaging and Collaboration Services
  CDO 1.2.1
   CDO Library
Index Server Utility
Index Server Query
These objects are described in the Index Server documentation. To display the documentation, follow this path:

Platform SDK
 Base Services
  Indexing Service

MSMQ objects Platform SDK
 Networking Services
  Microsoft Message Queuing Services (MSMQ)

Passing Parameters for Page Object Methods

When you pass parameters to method on page objects, and if the call results in a trip to or from the server, the parameters are converted to strings. This is required in order for the parameters to be passed via http protocol between pages.

If you write a method that takes parameters that require a particular data type, you should always check the data type and convert it if necessary. For example, the following function in a page object takes a parameter that must be treated as a number. The function therefore converts it before using it.

Sub SubmitBid( BidAmount )
   errorCode = ""
   iBidAmount = CInt( BidAmount )
   If iBidAmount < 0 then
      errorCode = INVALIDBID
   End if
   ' etc.
End Sub

For more details, see Writing Script for Script Objects.

Specifying Timeline Events

After adding the Timelines control to a page, you need to add script that specifies the events you named in the control's property pages. For example, the control in the figure below has two timelines specified. TimeLine1 has two events, ActionA and ActionB. TimeLine2 has only ActionX. To simplify the example, the events cause an alert to appear.

For more information see Timelines design-time control.

Testing Page Transitions

Since a page transition plays when you move from one page to another, you can only view the transitions in a Web browser. Quick View of the editor does not play transitions.

To view the results of enter transitions, use your Web browser to start with a page and then open the page with the transition.

To view the results of exit transitions, open the page with the transition and then open another page.

For more information, see PageTransitions design-time control.

Debugging

This section includes information about debugging client and server script as well as notes about SQL debugging.

Enabling ASP Debugging on the Server

You can debug script in an ASP page only if debugging is enabled for your application (project) on the IIS server. If you start a debugger session by launching the page from within your project, Visual InterDev can automatically enable debugging on the server as described under "Enabling Server Script Debugging for ASP Pages" in Debugging Server Script.

However, setting these options might not allow you to debug in these situations:

  • You want to attach to a document (process) already running on the server.

  • You want to launch the debugger in response to an error detected at run time (just-in-time debugging).

To debug in these situations, you must manually enable debugging for your application your application on the server.

To manually enable debugging for an IIS application

  1. On the server, start Microsoft Management Console (MMC) using this path from the Windows Start menu: Programs\Windows NT 4.0 Option Pack\Microsoft Internet Information Server\Internet Service Manager.

  2. Open the node for your server.

  3. Right-click your project (application) and then choose Properties.

  4. In the Directory tab under Application Settings, check Run in separate memory space, which causes your application to run out-of-process. This might take a short while.

  5. Choose Configuration, and then in the Application Configuration dialog box, choose the App Debugging tab.

  6. Under Debugging Flags, check Enable ASP server-side debugging and Enable ASP client-side debugging, and then close all dialog boxes.

Disabling debugging is the reverse of Steps 3 through 5.

Do not leave debugging options on permanently, because they can affect performance. For details, see the section "Performance Issues while Debugging Server Script" below.

Browser Displays Wrong Page when Debugging

If you launch the debugger and the browser displays the wrong page — that is, not the page you want to debug — return to Visual InterDev and make sure that the page you want to debug is set as the project's start page.

Syntax Error When Using Script Object Debugging

If you are using script object debugging options, you might see an error message similar to the following:

Microsoft JScript compilation error '800a03ea'

Syntax error

/server/_ScriptLibrary/scriptobject.asp, line nnn

try{
^

This error indicates that the server is not running JScript version 5.0 or higher, which is required for script object debugging. You can install JScript version 5.0 onto the server from the Microsoft Visual InterDev 6.0 CD or from the Microsoft Scripting web site at https://msdn.microsoft.com/scripting/.

Just-In-Time Debugging of Server Pages

If a debugger is installed on the server, the server will not pass server script syntax or run-time errors through to the client. Instead, it will stop page processing and display a message on its own computer's monitor prompting to launch the debugger. The server can launch either the Script Debugger installed with Microsoft® Internet Information Server (IIS), or if it is installed, the Visual InterDev debugger.

If you can watch the monitor on the computer running the server, you can respond to the message and debug locally on the server. However, if you cannot watch the server computer's monitor, you might prefer that the server pass error information through to the client so you can use remote debugging to find and fix the error.

To do so, you must remove all debuggers on the server. Uninstall the Script Debugger if it is installed. Similarly, make sure that Visual InterDev and other Visual Studio™ tools are not installed on the server. However, you must be sure that the Remote Debug Manager remains installed, or you will not be able to debug on the server at all.

Evaluating Expressions in the Debugger

While debugging, you can evaluate any expression dynamically by selecting it in the editor and then pointing the mouse cursor at it. The expression is evaluated and the results are displayed in a Tooltip. Alternatively, you can right-click the expression and add it to the Watch window.

However, you must be careful about evaluating expressions that can affect your debug session or even your Visual InterDev session. For example, if you select the expression Session.Abandon, the debugger will evaluate the expression and your current session will be abandoned.

Resetting Debugger Options After Abnormal Termination

If Visual InterDev is set to automatically enable server debugging, it reads the current debugger settings on your Microsoft Internet Information Server (IIS) the first time you debug an ASP page after opening a project. If required, Visual InterDev enables debugging, including moving the IIS application out of process. When you finish your debugging session, Visual InterDev restores the settings to what they were earlier.

However, if Visual InterDev quits while you are debugging — for example, if the computer loses power suddenly — the original settings are lost. When you next start Visual InterDev, it again reads the server debugging settings, but they might reflect the settings that were left when Visual InterDev quit abnormally.

If this has occurred, and you want the settings to be different from how they were left, you must manually reset them in IIS. In particular, if you want to disable ASP debugging and reset the application to run in-process, you must change these options yourself. For details, see "Enabling ASP Debugging on the Server" above.

Performance Issues while Debugging Server Script

Enabling debugging on Microsoft Internet Information Server (IIS) can affect the performance of your projects in several ways.

Visual InterDev offers options that automatically enable server debugging on your IIS application (your Visual InterDev project). The first time you launch the debugger after opening the project, Visual InterDev checks the IIS debugger options for your project, and if they are not set, sets them. You can reduce this setup time slightly by using the IIS Microsoft Management Console (MMC) application to manually enable debugging for your application, as described in "Enabling ASP Debugging on the Server" above.

When debugging is enabled on the server, it can affect the server's performance. It is recommended that you enable debugging only when you need it, and that you never enable debugging on a live production server. For details about debugging server script, see Debugging Server Script.

Do not use Active Desktop™ mode of Internet Explorer while you are debugging. Doing so can have two effects. First, the debugger will monitor all applications running from the Desktop, which can affect performance. Second, problems that might arise during debugging that would ordinarily require you only to reboot Internet Explorer might require you to reboot Windows.

Unable to Install SQL Debugging Component

If the BackOffice installation wizard reports that it cannot install SQL Debugging, check that you have installed Service Pack 3 or higher for the SQL server.

Troubleshooting SQL Debugging

If an error occurs while you are trying to use SQL debugging, try one of the following tips:

  • If SQL Server is configured to log on as System Account, you will not be able to use SQL debugging.

  • Errors on the server are written into an event log. To view the log, from the Windows Start menu on the server, choose Programs, then Administrative Tools, and Event Viewer. Open the Application log, and then look for SQLDebugging98 under Source. It is sometimes also useful to check the System log.

  • If you are unsure whether you have the correct setup on your server, look for the file MSSDI98.DLL in the Bin folder of your SQL Server installation.

If you cannot get SQL debugging to work on a Windows95 workstation, confirm that the client DCOM settings are correct.

To check the DCOM configuration on a Windows® 95 client computer

  • Using Regedit.exe, check the following settings in the Windows Registry under the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLE:
    • EnableDCOM should be set to Y.

    • EnableRemoteConnet should be set to Y.

If they are not set correctly, change them, and then restart the computer.

Evaluating SQL Variables in the Debugger

If you are debugging stored procedures or triggers, and if you click a variable with an "@" prefix, the debugger adds it to the Watch window without the @ prefix. Edit the name of the variable in the window to add the @ prefix back in.