Microsoft KB Archive/318884

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

Article ID: 318884

Article Last Modified on 2/3/2006

-

APPLIES TO


 * Microsoft Visual Studio .NET 2003 Professional Edition
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * 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 \\ \wwwroot$ path does not point to the default location path on the Microsoft Internet Information Services (IIS) server.

The &quot;Steps to Reproduce Behavior&quot; 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
 Make sure that you are not sharing the default wwwroot location (which is usually located at C:\Inetpub\wwwroot). Create a new folder named Test in the default wwwroot location (for example, C:\Inetpub\wwwroot\Test). Create a new text file, and then save the text file in the Test folder. Create a new folder named wwwroot on your desktop. 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. Follow these steps to create a new empty Web project in either Microsoft Visual Basic .NET or Microsoft Visual C# .NET: <ol style="list-style-type: lower-alpha;"> Start Visual Studio .NET.</li> On the File menu, point to New, and then click Project.</li> 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.</li></ol> </li> On the Project menu, click Copy Project.</li> In the Destination project folder text box, type http:// /Test/ .</li> In the Web access method section, click File share.</li> In the Path text box for the file share, type \\ \wwwroot$\Test\, and then click OK. Notice that you receive the following error message:

Unable to create Web project 'Test'. The file path '\\ \wwwroot$\Test' does not correspond to the URL 'http:// /Test'. The two need to map to the same server location. HTTP Error 404: Object Not Found.

</li> In the error message dialog box, click OK. Browse to the C:\Inetpub\wwwroot\Test\ folder. Notice that this folder has been deleted.</li></ol>

<div class="references_section">