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:
This section covers issues with files, diagrams, site navigation, builds, and Microsoft® Internet Information Server (IIS).
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
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:
For more information about specifying the list of hosts, see Connecting to a Proxy Server.
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.
For more information about using site diagrams in local mode, see Visual InterDev Modes in Site Designer.
For more information about using site diagrams in local mode, see Visual InterDev Modes in Site Designer.
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.
For more information about the PageNavbar DTC, see PageNavbar Design-Time Control.
To verify that the VINavbar component is installed
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.
For more information, see PageNavbar Design-Time Control.
For more information about the Layout DTC, see Layout Header and Footer Controls.
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).
Nature.inf
to MyTheme.inf
.title=
text to the new theme folder name. For example, change title=Nature
to title=MyTheme
.For more information, see Adding Pages to a Site Diagram.
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).
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.
For more information, see Link Verification.
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.
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:
-and-
To set "allow Web administration operations" without someone logged onto 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.
For more information, see the documentation for Internet Information Server or Microsoft Transaction Server.
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.
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
This section covers issues with connecting to databases through ODBC, data binding and Recordset controls.
You can use the Add Data Connection command to add a data connection to a project. This command is available from within the Project Explorer when you select a project or the data environment.
The Add Data Connection command allows you to create a data source name (DSN) and define a data connection using this data source, as described in Connecting to a Database.
You can also use the ODBC Data Source Administrator, available in the Control Panel, to create DSNs. These DSNs will be available in the Select Data Source dialog box, and you can use them to make data connections in Visual InterDev.
However, you must do this using the Add Data Connection command; the DSNs created using the ODBC Data Source Administrator don't become data connections until you use the Add Data Connection command to create the connection from the data source.
For more information about using data connections with Visual InterDev, see Connecting to a Database and Data Access Architecture.
For information about using data connections with the Microsoft® Visual Database Tools, see Adding a Data Connection to a Database Project.
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.
There is a Use quoted identifiers check box in the Create New Data Source ODBC dialog box, which 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.
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.
When you see [red dot /w !] 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 [red dot] and Visual InterDev will display a Tooltip that explains the problem.
Some typical causes are:
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.
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 %>
This section covers issues with using the HTML editor, design-time controls, and other controls.
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.
When writing script to interact with script objects created by design-time controls, keep the following tips in mind:
Tip When you are working with JavaScript, statement completion will not recognize an object unless you have used correct capitalization.
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.
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.
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:
The Quick view 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:
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 "<MARQUEE>". 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:
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.
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.
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.
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.
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.
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.
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.
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.
For information about | See this location in MSDN and elsewhere |
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 Database and Messaging Services Microsoft Data Access SDK Microsoft ActiveX Data Objects ADO Programmer's Reference Getting Started with ADO Getting Started With ADO 2.0 |
Ad Rotator Browser Caps Content Linking My Info |
Platform SDK Internet/Intranet/Extranet Services Active Server Pages Installable Components for ASP See also Creating Portable Script. For an example using the Ad Rotator object, see the Random Ad Sample. |
Dictionary FileSystem |
Visual Studio Documentation Reference Language References VBScript Language Reference Objects |
CDONTS NewMail CDONTS Session |
Platform SDK Internet/Intranet/Extranet Services Active Server Pages Installable Components for ASP Collaboration Data Objects for NTS Component |
Index Server Utility Index Server Query |
These objects are described in the Index Server documentation. To display the documentation, follow this path from the Windows Start menu on the server where IIS is installed:
Programs In the documentation, follow this path:
Microsoft Index Server |
MSMQ MSMQ Mail |
Platform SDK Networking and Distributed Services Microsoft Message Queue Server (MSMQ) MSMQ Reference MSMQ ActiveX Components MSMQ Mail ActiveX Components |
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.
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.
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.
This section includes information about debugging client and server script as well as notes about SQL debugging.
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:
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
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.
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.
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.
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.
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.
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 do enable debugging only when you need it, and that you never enabled 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.
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.
If an error occurs while you are trying to use SQL debugging, try one of the following tips:
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
If they are not set correctly, change them, and then restart the computer.
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.