Wednesday, June 5, 2013

Unable to deploy solution to Claims-enabled SharePoint Site using Visual Studio 2012

I was creating a Custom Claims Provider in Visual Studio 2012 for my Claims-based SharePoint Web Application and had a need to debug my Custom Claims Provider to troubleshoot why some methods were not behaving as expected.

Well, in order to debug my solution, I had to be able to deploy my solution from within Visual Studio.

Unfortunately, whenever I tried to deploy my solution from within Visual Studio, I would receive the following error message:

Error occurred in deployment step 'Recycle IIS Application Pool': <nativehr>0x80070005</nativehr><nativestack></nativestack>Access Denied.

One of the problems I determined from some Google searching was that I was using Visual Studio 2012 with my Windows ID/Windows Domain Login, while my SharePoint Site Collection was Claims-enabled and thereby required a Claims-based Login ID for authentication and authorization into the system.

So, I had to do the following:

  1. Open up Central Administration
  2. Click on Manage web applications
  3. Click on my specific Web Application to select it
  4. Click on the User Policy button
  5. Search for your user id/login id
  6. Now, rather than selecting your User ID from the SAML Provider, select from the Active Directory provider instead.
  7. You should now see a Claims-based Windows User Token in the list of users in the User Policy dialog.
  8. Now, once again try to deploy your solution from within Visual Studio 2012.  If all went well, it should  now deploy successfully!

1 comment:

  1. Appreciating the hard work you put into your site and detailed information you present. Wonderful read!