BUG: A folder is deleted when you copy Web project in Visual Studio .NET (318884)



The information in this article applies to:

  • Microsoft Visual Studio .NET (2003), Professional Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2002), Professional Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2002), Academic Edition

This article was previously published under Q318884

SYMPTOMS

When you use Visual Studio .NET to create or to copy a Web application, a folder that already exists with the same name in the default wwwroot folder is deleted, along with the contents of this folder.

RESOLUTION

To work around this problem, you can use a utility to redirect activity on the folder. For example, you can use the Linkd.exe utility from the Microsoft Windows 2000 Resource Kit to redirect input/output (I/O) activity for the affected folder to another location. This workaround requires that the affected folder is on an NTFS file system partition.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

This problem occurs when the \\server\wwwroot$ path does not point to the default location path on the Microsoft Internet Information Services (IIS) server.

The "Steps to Reproduce Behavior" section uses the Copy Project feature to demonstrate the problem. However, you can reproduce the problem by other means, such as by checking a project out of Microsoft Visual SourceSafe and by specifying the project's location under the same scenario.

Steps to Reproduce Behavior

  1. Make sure that you are not sharing the default wwwroot location (which is usually located at C:\Inetpub\wwwroot).
  2. Create a new folder named Test in the default wwwroot location (for example, C:\Inetpub\wwwroot\Test).
  3. Create a new text file, and then save the text file in the Test folder.
  4. Create a new folder named wwwroot on your desktop.
  5. Share the new wwwroot folder as wwwroot$. If necessary, make sure that you do not share any existing file shares that have the same name.
  6. Follow these steps to create a new empty Web project in either Microsoft Visual Basic .NET or Microsoft Visual C# .NET:
    1. Start Visual Studio .NET.
    2. On the File menu, point to New, and then click Project.
    3. In the New Project dialog box, click Visual Basic Projects or Visual C# Projects under Project Types, and then click Empty Web Project under Templates.
  7. On the Project menu, click Copy Project.
  8. In the Destination project folder text box, type http://server/Test/.
  9. In the Web access method section, click File share.
  10. In the Path text box for the file share, type \\server\wwwroot$\Test\, and then click OK. Notice that you receive the following error message:
    Unable to create Web project 'Test'. The file path '\\server\wwwroot$\Test' does not correspond to the URL 'http://server/Test'. The two need to map to the same server location. HTTP Error 404: Object Not Found.
  11. In the error message dialog box, click OK. Browse to the C:\Inetpub\wwwroot\Test\ folder. Notice that this folder has been deleted.

REFERENCES

For more information about the Windows 2000 Resource Kit, click the link below:

Modification Type:MajorLast Reviewed:2/3/2006
Keywords:kbvs2005doesnotapply kbvs2005swept kbvs2002sp1sweep kbbug kbnofix KB318884 kbAudDeveloper