I'm working on a provider-hosted low-trust Share Point App. I used to develop it with the Debugging Function of Visual Studio which created a new Client ID and Client Secret every time the debugging session was started.
2> Web.config updated with Client ID 4437f542-4f58-47a3-81ee-9116a03c6a5c
2> Installation is in progress (00:00:00)
2> ...
As I would like to provide this App via the Office Store I will need a constant Client-ID. So I created one via the Seller Dashboard of Microsoft and updated my Web.config file.
But now I'm getting this error message every time I start debugging the App with the new Client ID and Secret: The app "i:0i.t|ms.sp.ext|ClientID@b5990129-f04a-4d71-8a1f-5c958300a5e3" does not exist.
The only thing I can see in that app String is the ClientID.
I tracked the calls in my App and found out that the first thing which is called in my App is the OnActionExecuting(ActionExecutingContext filterContext)
function in the SharePointContextFilterAttribute.cs
file.
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
if (filterContext == null)
{
throw new ArgumentNullException("filterContext");
}
Uri redirectUrl;
switch (SharePointContextProvider.CheckRedirectionStatus(filterContext.HttpContext, out redirectUrl))
{
case RedirectionStatus.Ok:
return;
case RedirectionStatus.ShouldRedirect:
filterContext.Result = new RedirectResult(redirectUrl.AbsoluteUri);
break;
case RedirectionStatus.CanNotRedirect:
filterContext.Result = new ViewResult { ViewName = "Error" };;
break;
}
}
The first time CheckRedirectionStatus()
returns RedirectionStatus.ShouldRedirect
and after that the App is not called again. So I guess the SharePoint throws an error after that redirection.
How do I get a ClientID created in the Seller Dashboard working with my provider-hosted App?