PRB: "Read-Only" Message When Saving Changes to File

ID: Q195953


The information in this article applies to:


SYMPTOMS

After you edit a file in Visual InterDev 6.0, when you try to save it or view it by clicking View in Browser, the following message might appear:


   The file <path\file>, which you have asked to save, is read-only on
   disk. 


CAUSE

Visual InterDev 6.0 handles editing, saving, and releasing working copies of files differently compared to Visual InterDev 1.0.

When you release a working copy of a file in Visual InterDev 1.0, Visual InterDev 1.0 not only updates the server's copy of the file, but also deletes your local copy. As a result, your page and code disappear from InfoViewer and your file's icon is unavailable in File View.

When you release a working copy in Visual InterDev 6.0, Visual InterDev 6.0 leaves a local copy of the file on the workstation and in the editor window (if the editor window is open when the command is issued). The new title in the title bar that appends the words [Read Only] after the file name and the icon in front of the file in Project Explorer changes from a pencil to a padlock indicate that you now have a read-only copy of the code in the editor. If you continue to edit the file and then you try to save it, the following message appears:


   The file <path\file>, which you have asked to save or "View in Browser",
   is read-only on disk. 
You can choose one of the following options in the message dialog box: Save As, Overwrite, Don't Save, Cancel, or Help.


RESOLUTION

If you do not want to lose the code that you added when the file was read- only, select Overwrite in the message dialog box. Note, however, that your changes will only be overwritten on the local copy of the file, not the master copy. As a result, View in Browser shows the unmodified master copy (assuming the project is in master mode). To update the master with the changes, select the file in the Project Explorer, right-click, and click Get Working Copy. The system notices that you have two different versions, one newer one on the local computer and an older copy on the master. The following message dialog box appears:


   There is already a file with this name in your working directory. Do you
   want to use it as your working copy? 
The dialog box includes the date and time of the both the master and local copies. Click Use Existing File to select your local version. From the Project menu, select Web Files, and then choose Release Working Copy to update the master with the newer local version.

NOTE: it is probably more visually helpful to close a file out of the editor before performing the Release Working Copy because when you re-open the project in the editor Visual InterDev 6.0 will prompt you for a working copy or read-only copy.


STATUS

This behavior is by design.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new project or use an existing project. Add a new Active Server Pages page or HTML page.


  2. Add a single line of code to the body of the file.


  3. Save the file, and leave it open in the editor.


  4. In the Project Explorer, right-click on the file and click Release Working Copy.


  5. Add another line of code in the file.


  6. Save the file or click Preview in Browser.



Keywords          : kberrmsg kbVisID600 kbGrpASP 
Version           : WINDOWS:6.0;
Platform          : 
Issue type        : kbprb 

Last Reviewed: May 7, 1999