Error Deploy Solution To Site

This is a simple and quick post to provide a solution for developers working against sites configured with claims-based authentication and receiving an access denied error while trying to deploy solutions via Visual Studio. The exact error is:

Error occurred in deployment step ‘Recycle IIS Application Pool’: <nativehr>0x80070005</nativehr><nativestack></nativestack>Access denied.

The problem here is that Visual Studio is trying to access the site, specified in the project’s Site URL property, using the currently logged on windows account. As the site has been configured for claims-based authentication only, this process causes the access denied error to be thrown.

A quick fix for the development environment is to explicitly add your user account to the Web Application. Doing this will allow the Visual Studio process to recycle the application pool and deploy the solution package.

To do this, bring up the Central Administration site and navigate to the Manage Web Applications page (/_admin/WebApplicationList.aspx). Click on the web application that hosts the site you are trying to deploy to and then click the User Policy ribbon item. Finally, simply add your windows account to the list of users with the Full Control permission.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s