I have a SharePoint provider hosted app (hosted in Azure) that already works on 2 installations (all these environments are 100% separate environments).
Now that I am installing it on a 3rd environment I get
An error occurred while processing your request
The clientID
and secretkey
are correct. I checked the manifest in the actual app, connected with FTP to the Azure site to validate the settings in the web.config
.
The ClientContext returns a "CanNotRedirect" because the httpMethod is POST
if (StringComparer.OrdinalIgnoreCase.Equals(httpContext.Request.HttpMethod, "POST"))
{
return RedirectionStatus.CanNotRedirect;
}
If I ignore this error the next error is from the tokenhelper.cs. It's not finding the AppContext, AppContextToken, AccessToken or SPAppToken in the querystring or formrequest.
string[] paramNames = { "AppContext", "AppContextToken", "AccessToken", "SPAppToken" };
foreach (string paramName in paramNames)
{
if (!string.IsNullOrEmpty(request.Form[paramName]))
{
return request.Form[paramName];
}
if (!string.IsNullOrEmpty(request.QueryString[paramName]))
{
return request.QueryString[paramName];
}
Any ideas? I'm probably missing a configuration somewhere. All help is appreciated.