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开发者_如何学Go. 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.
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.
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.
There are two points of check.
- Share permissions.
- File permissions.
You can both found on the remote computer, right click on the folder name -> permissions, and you see the Sharing and the Security tab. Change them, to left you write.
Help: how to share files:
http://www.howtogeek.com/howto/windows-7/share-files-and-printers-in-windows-7-with-homegroup/
and a video tutorial about :
http://www.youtube.com/watch?v=BWB9pu1T2dQ
Video tutorial for share folder base on my answer
http://www.youtube.com/watch?v=OomgNBAv0hI&feature=related
When you say administrator I will assume that you are an administrator to both the computer and the server containing the mapped drive. If that is the case then,
You might want to give this a shot:
To resolve this problem, add a MIME type for the .tmp file in IIS. To do so, follow these steps: In Control Panel, open Administrative Tools, and then double-click Internet Information Services. Expand the (local computer) node, and then expand Web Sites. Right-click Default Web Site, and then click Properties. In Default Web Site Properties, click the HTTP Headers Tab. Click MIME Types. In MIME Types, click New to register a file extension. In the Extension textbox, type .tmp . In the MIME Type textbox, type temp. Click OK.
http://support.microsoft.com/kb/817264
If you are not in "Admin" mode and you are still having the issue, you can copy the "Target Location" path setting in your publish profile in VS, and then go to the file menu and check if you have access to that location, if you are prompted to enter user credentials, enter your credentials, this will allow Visual Studio to have the credentials needed. Now, go back to the publish profile and retry, it will use the credentials you just entered.
精彩评论