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:

alt text

So I turned on Failed Request Tracing for the Web Management Service and I see this:

alt text

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:

Configure the Web Deploy Component on the Web Server

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?


This is a bug with Visual Studio 2010 which defaults to using the wrong Microsoft.Web.Deployment assembly (

To overcome this issue an edit needs to be made to VS 2010's configuration file to force it to use

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config


The xml fragment above should be added to:


This was confirmed with Microsoft's PSS group. Apparently Visual Studio 2010 SP1 will address this issue.

Obviously you need MS WebDeploy 2.0 installed on the deployment computer. This can be obtained via the Web Platform Installer or by installing Web Matrix 1.0 RTM which incidentally does the right thing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.