Q:

Publishing an ASP.Net web application to a mapped drive with Visual Studio 2008 and Windows 7

We have a shared drive where web applications are published to. When I attempt to publish I get the following error:
------ Publish started: Project: XXX.Web, Configuration: Release Any CPU ------
Connecting to T:\WebSites\XXX\...
Unable to create the Web site 'T:\WebSites\XXX'.  The path 'T:\WebSites\XXX' does not exist or you do not have access. The system cannot find the path specified.

Details

OS: Windows 7
IDE: Visual Studio 2008 (running as administrator)
Path exists? Yup.

I assume it's some permissions issue, but I have no idea where to start.

A:

If anyone is still wondering, I had this same problem in Visual Studio 2012 with MVC4 in windows 7. I had previously published to a mapped drive and now all of a sudden it would no longer publish. In windows explorer I could see the mapped drive, but visual studio claimed it could not find the drive.
It turns out that if you are running visual studio in admin mode and your drive wasn't mapped in admin mode, you have to remap it.
(solution)
To do this, run explorer in admin mode, and then re-map your drive. Afterwards visual studio should be able to see the drive again.

A:

I had this same problem with VS2010 and what worked for me is to click the [...] button next to the target location and rebrowse to the destination folder.  Could be that VS is showing one path in the publish and output window, but really trying to access some other folder that's protected in Win7.  That's why it worked in XP and not Win7 because Win7 has many more secure folders.

