I have installed and configured WebDeploy 2.0 on a (test) server so that WebMatrix and Visual Studio 2010 users can use this to upload their applications to our Windows 2008R2 environments.
This works well with WebMatrix but I encountered a problem deploying an application from Visual Studio 2010. If I click publish and use the WebDeploy method, Visual Studio reports an error and nothing gets published:
So I turned on Failed Request Tracing for the Web Management Service and I see this:
53 AspNetModuleDiagErrorEvent Uri /MsDeploy.axd eventData Tracing deployment agent exception. Request ID ''. Request Timestamp: '01/22/2011 00:18:54'. Error Details: System.UnauthorizedAccessException: Access to the path 'd:\' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.DriveInfo.get_DriveFormat()
To facilitate use of the WebDeploy feature the delegated management user is granted Full Control of a site's web folders. This is covered in this article:
No other permissions are mentioned. Given the nature of the error I tried giving the site's delegated management user Read Attribute
permission on D:\
and limited it to This Folder Only
and immediately Visual Studio 2010 is able to publish the application using WebDeploy.
Why is the Visual Studio package behaving differently from WebMatrix on the server?