Thursday, February 16, 2017

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 following steps 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 is matching with the AppManifest.xml in your solution.



<?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>

Tuesday, February 14, 2017

Insufficient SQL database permissions for user 'Name: doman\SP_UserProfiles SID:

Insufficient SQL database permissions for user 'Name: doman\SP_UserProfiles SID: S-1-5-21-2738186777-3937669245-3595685374-1123 ImpersonationLevel: None' in database 'SharePoint_Config' on SQL Server instance 'ADXWSQL.adxweb.ae'. Additional error information from SQL Server is included below.

The EXECUTE permission was denied on the object 'proc_putObjectTVP', database 'SharePoint_Config', schema 'dbo'.

This is a caused by not having permission to database objects of using least privileges configuration in farm configuration. Thus you need to give permission exclusively to this Object.

First you need to Connect to SharePoint Database using privileged account.

Then go the SharePoint Config Database and security section. Then go to Roles and find WSS_Content_Application_Pools under the Database Roles section.

image

Double click (or Right Click -> Properties) the item and select the Securable section in the modal window.

image

And click Search.. and select Object Type in the Window and Click OK.

image

Then click on Object Types and select the Stored Procedure.

image

Type proc_putObjectTVP in Object names section and check names for select the item.

image

and select the item and Click Ok.

image

Then you can see the item in the securable and give the execute permission to the object.

image