Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Provider hosted high trust apps not working on Extranet

$
0
0

Hi,

I have created a Sharepoint site and I am using a provider hosted high trust app. This is working great for my internal users who are accessing the site on http://intranet.mydomain.co.uk and the apps are running on https://apps.mydomain.co.uk.

The problem I have is that I am now trying to allow external users to access the site using a different address. I have therefore "Extended" my sharepoint site in Central Administration and setup a separate IIS instance which has Windows and Forms authentication enabled, this site is using the address https://extranet.mydomain.co.uk.

If I try and access the site using https://extranet.mydomain.co.uk and then select "Windows authentication" from the dropdown on the login page and enter my credentials I am taken to the sharepoint site, I am then prompted for credentials for the apps site https://apps.mydomain.co.uk (this is an annoyance in itself but have another post trying to find a solution to this issue), once I enter the same credentials for my app site all my apps show the following error:

Server Error in '/Test.Sharepoint.App' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details:System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 
[NullReferenceException: Object reference not set to an instance of an object.]
   Test.Sharepoint.AppWeb.TokenHelper.GetRealmFromTargetUrl(Uri targetApplicationUri) +568
   Test.Sharepoint.AppWeb.TokenHelper.GetS2SClientContextWithWindowsIdentity(Uri targetApplicationUri, WindowsIdentity identity) +124
   Test.Sharepoint.AppWeb.Pages.DocumentLists.Page_Load(Object sender, EventArgs e) +811
   System.Web.UI.Control.LoadRecursive() +70
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3177


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18034

Does anyone know what could be causing this issue and how I get around it? Is it to do with the fact that when setting up a high trust app and running the powershell commands you have to put the URL of the sharepoint application in (although the Extranet site is technically running under the same application it has just been extended)?

I appreciate any help or advice anyone can give me on this.

Regards
Tony


Impreza Software Development


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>