Archive for the ‘Applications’ Category

High Trusted SharePoint Application Gotchas

December 10, 2012

I followed this guide and this guide to create a demo high trust applications and here’s the summary of things the I came across:

Problem
Cannot deploy the solution in general.
Fix:

  1. You cannot be logged on as sharepoint\system. Log on as another user to the server.
  2. You have to start Visual Studio Administrator (Right Click “Run as administrator” command)

Problem
Cannot deploy the solution with error: Error occurred in deployment step Uninstall App for SharePoint’: ‘Cannot connect to the sharepoint site
Fix
The current user does not have permissions on the SharePoint Config Database and Content Database. Give the user owner permissions on these two databases.

Problem
Cannot deploy the solution with error: Error occurred in deployment step ‘Install app for SharePoint’: The provided App differs from another App with the same version and product ID.
Fix
Open manifest.xml in code view and generate new guid for the app.

Problem
Cannot deploy the solution with error: Error occurred in deployment step ‘Install app for SharePoint’: We’re sorry, we weren’t able to complete the operation, please try again in a few minutes. If you see this message repeatedly, contact your administrator.
Fix
The current user has to have owner permissions on the App_Management Database.

Problem
Problem when trying to debug: Unable to launch IIS Express Web Server
Fix
Switch to full IIS.

  1. Open Properties of the AppWeb Project and uncheck the checkbox “Use ISS Express” on the “Web” app.
  2. Click Create new Virtual Directory on the same tab.
  3. Assign “full control” permissions on the folder for the application pool account.

Problem
Cannot connect to https://localhost
Fix
I did not configure IIS to run with https. I had  to change the manifest.xml of the app to replace the ~remoteAppUrl to http://localhost .

Problem
Could not load file or assembly ‘Microsoft.IdentityModel, Version=3.5.0.0 TypeInitializerException System.Runtime.InteropServices.COMException: The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))
Fix
The application pool was running in .NET Framework Version 2.0. Should be 4.0. You can change this directly in the IIS in the application pool settings.

 

Advertisements