Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / All-Topics

You Are Being Redirected to the Following URL That Was Not Registered as the App Launch URL

5.00/5 (2 votes)
15 Feb 2017CPOL 10.8K  
You are being redirected to the following URL that was not registered as the app launch URL

You are being redirected to the following URL that was not registered as the app launch URL https://xx?SPHostUrl=xx&SPLanguage=enSPClientTag=0&SPProductNumber=xx&SPAppWebUrl=xx&{AppContextToken}. If you trust this URL, click here to proceed to the app now. Otherwise, go back to the previous page or close this page."

It is common that you may have encountered this kind of an error when you are accessing an app that you have developed and published to the SharePoint 2013.

There can be many deep reasons behind the message such as:

  • Not provisioning the app web correctly
  • Errors on App management service

But most of the time, it is because of not registering your app in the SharePoint.

You can simply follow the steps given below to register your app in the current SharePoint site.

First, go to Appreg.aspx page which used to register the app in http:// xxx/_layouts/15/Appreg.aspx. Then, you will find a following interface where you can register your app with SharePoint.

image

But you need to make sure the values you are entering are matching with the AppManifest.xml in your solution.

XML
<?xml version="1.0" encoding="utf-8" ?>
<!--Created:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9-->
<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest" 
Name="ShopSAdmin" ProductID="{4813c773-d1b1-4ec6-8274-32f1152bd6b7}" 
Version="1.0.0.1" SharePointMinVersion="15.0.0.0" > 

<Properties>
<Title>ShopSAdmin</Title>
<StartPage>~remoteAppUrl/Pages/default.aspx?{StandardTokens}</StartPage>
</Properties> 

<AppPrincipal>
<RemoteWebApplication ClientId="*" />
</AppPrincipal> 

<AppPermissionRequests>
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="Manage" />
</AppPermissionRequests>
</App>

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)