Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/331.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 提供商托管的应用在SharePoint应用商店中更新后没有访问令牌_C#_Sharepoint_Sharepoint 2013_Access Token_Provider Hosted - Fatal编程技术网

C# 提供商托管的应用在SharePoint应用商店中更新后没有访问令牌

C# 提供商托管的应用在SharePoint应用商店中更新后没有访问令牌,c#,sharepoint,sharepoint-2013,access-token,provider-hosted,C#,Sharepoint,Sharepoint 2013,Access Token,Provider Hosted,我有一个提供商托管的SharePoint应用程序(v1.0.0.0),并发布到SharePoint应用商店。现在,我有了一个新版本(v1.0.0.1)(更新了客户端ID和客户端密钥),该版本也发布到了SharePoint store 当用户在其站点中更新应用程序时,它返回一个错误,我在TokenHelper中发现应用程序无法使用此方法获取访问令牌 public static string GetContextTokenFromRequest(HttpRequestBase request)

我有一个提供商托管的SharePoint应用程序(v1.0.0.0),并发布到SharePoint应用商店。现在,我有了一个新版本(v1.0.0.1)(更新了客户端ID和客户端密钥),该版本也发布到了SharePoint store

当用户在其站点中更新应用程序时,它返回一个错误,我在
TokenHelper
中发现应用程序无法使用此方法获取访问令牌

public static string GetContextTokenFromRequest(HttpRequestBase request)
    {
        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];
            }
        }
        return null;
    }
但对于新用户,他们可以成功安装和访问该应用程序

应用程序更新是否有任何特殊处理