0

I was trying to register a provider hosted app on my local IIS, but fail to find any information (there is a lot of information about hosted on Azure Web Sites, but none for IIS). The app would be used with SharePoint Online.

Anyone had any experience registering an IIS-provider hosted app for SharePoint online?

The issue I am receiving is that the C# client object model could not retrieve its context – I am using the SharePointContext class to generate a context (http://www.looselytyped.net/2013/06/26/sharepoint-app-tools-in-visual-studio-2013-preview-the-new-sharepointcontext-helper/)

When debugging on local IIS Express, I do not have any issues, but when deploying to IIS, the context could not be created. Here is what I have done:

1. Ensured that Client ID and Client Secret are the same in both AppManifest (app) and web.config (web project).

2. Registered new app in the target site collection through, ensuring both Client ID and Client Secret correspond to the ones in the app manifest and web.config.

3. Ensured that the redirect URL and domain are targeting my IIS.

4. When accessing my provider hosted app from outside, i.e. not SharePoint it shows the expected screen (“try to run your app from SharePoint” notification)

(Visited 41 times, 1 visits today)
Add a Comment