Tips for Microsoft Visual InterDev 6.0
Install Visual SourceSafe™ (VSS) and the latest FrontPage® Server Extensions (FPSE)
Microsoft® Visual InterDev® (VID) version 6.0 uses the same mechanism as Microsoft FrontPage to communicate with the Web server. These extensions (known as FrontPage Server Extensions, or FPSE) will also be required on your local computer if you use Local Mode editing.
In order for VID to add your project to source control, Visual SourceSafe (VSS) must be installed on the Web server where your VID projects are located. You cannot check files in or out using FPSE unless VSS is installed on the server.
How to Start from Existing Projects
To view and edit BDG files using Visual InterDev
- Copy the source files from the server to your local computer's Inetpub\wwwroot directory.
- Create a new Web project from within VID. You can use Master or Local mode, since the files exist on your local machine.
- Ignore any errors related to global.asa that VID generates, and DO NOT REPLACE global.asa if asked to do so.
- If necessary (and it usually is), you'll also need to add a Data Connection to global.asa, as described in the sample application's documentation. For BDG samples, consult the Deployment section for installation details.
To ship a BDG application that has been developed with VID, we do the following:
- Delete all _vti_ directories and .SCC files. These directories and files are used by FPSE and VSS, respectively. If the BDG ships the VSS files, VID will exhibit some confusion when attempting to synchronize the project with VSS files from a nonexistent server.
- Delete the existing Data Connection. This step removes installation-specific ASP Application settings from global.asa. The application won't be able to read from its database until you add an appropriate Data Connection. (See Deployment section.)
- Remove the _ScriptLibrary folder. Since it was introduced with VID 6.0, the Script Library has not changed significantly. Because the _ScriptLibrary folder and its contents are copied whenever you create a new Web project with VID, and because VID will produce a benign but confusing error if the _ScriptLibrary folder already exists, we remove it before shipping. (Note: So far in the BDG, only the Library Catalog page in the administrative option section of the FmLib scenario requires anything from the _ScriptLibrary. This folder is not used by Scenario 3.)
Setting up Web Permissions
Connecting to your Visual SourceSafe server properly depends on VSS knowing who you are. Also, you'll need to identify yourself to the server when debugging ASP. Also note that working across Windows NT® domains can produce unexpected results when passwords are not changed together.
To set up Web Project Permissions
- On the Visual InterDev Project menu, click Web Project and then click Web Permissions.
- Click the Use unique permissions for this Web application option button, and click Apply. You will not be able to change to the Users tab or the Groups tab until you have applied this setting.
- Click the Users tab. Click Add. Select Windows account name from the Names list and add them to the Add names list by clicking the > button. Select the type of access (browse, author, or administer) and click OK.
Note Do not grant access to the Everyone account, or to any group containing the anonymous IIS user (IUSR_<computername>) account. Doing so will allow anonymous users to access your source files. You also risk losing changes to files because files can be checked out of VSS by the anonymous user account.
Precautions for Adding a Project to Visual SourceSafe
- Add the Selection, not the Solution. The Solution is the root of the VID project, and it can contain multiple project files. Since any one person's Solution file can be quite different from another's, it is more flexible to add just the project to VSS. The only way to add the current project to VSS is to select it in Project View before opening the Add to Source Safe dialog box.
- Visual SourceSafe adds .SCC files to your server. When copying the project to a new location, don't forget to remove these files.
- Check-in and check-out occurs on the server, not on your local computer. Local files are transferred to the server with FPSE, and then the server's version of the file is checked into VSS.
- Release all working copies before adding a project to source control. When adding a project to source control, VID uses the files in the master Web project, not in your local cache. Even worse, VID doesn't check out the files that you have been working on from VSS for you. Once a file is checked into VSS, you'll have to synchronize against the server when checking files out. You will be confronted with the prospect of losing your work when VID asks you to overwrite originals with a copy from the server.
- Synchronizing your project can sometimes fail. This is especially bad when synchronizing a project across a domain, or over a phone line or PPTP connection with a remote server. Since VSS uses a slightly different authentication model than is required by Windows NT, you may have access to VSS, but some copy operations will fail on the remote server. The final outcome of this is a Project View in VID that does not reflect an accurate picture of which files are checked out on the local computer.
Visual InterDev and Active Server Pages
In order for you to get the most from the drag-and-drop HTML editing that VID provides, you must be careful how you add ASP script to your HTML.
For example, the following HTML mixed with valid ASP prevents you from switching to the editor's Design mode.
<INPUT VALUE="<%= Request.ServerVariables("SERVER_NAME") %>">
Likewise, if you type the ASP value directly into the Design window, VID will insert the following invalid HTML when you switch back to Source mode:
VALUE="'" <% = Response.QueryString("Test") %>'
In order for VID to display HTML that contains ASP correctly in Design mode, you must not use double-quotes inside ASP delimiters. The following ASP will display properly in both Design mode and in your browser:
<% sServerName = Request.ServerVariables("SERVER_NAME") %>
<INPUT VALUE="<%= sServerName %>">
Saving Unicode Files with Visual InterDev
Drag-and-drop and text editing of Unicode files is problematic with Visual InterDev. When you are adding a Unicode file to the Web project, it will often be created as an UTF-8 text file. If this happens, the Unicode character encoding will be lost, and the XML parser will report the following error:
Invalid at the top level of the document.
It doesn't seem to matter if you overwrite an existing Unicode file, nor does Visual InterDev seem to remember that you were editing a Unicode file.
To save a file as Unicode
- Select the file you want to save in the Project Explorer window of Visual InterDev.
- On the Visual InterDev File menu, click Save File As (where File is the file you have selected).
- Select Unicode Text from the Save as type drop down list box. Click OK.