Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/290.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.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# Kentico GetUserDataFromAuthCookie()返回null_C#_Kentico - Fatal编程技术网

C# Kentico GetUserDataFromAuthCookie()返回null

C# Kentico GetUserDataFromAuthCookie()返回null,c#,kentico,C#,Kentico,我在K10公司网站上工作。 在signexputton.ascx.cs上,我将调用移动到GetUserDataFromAuthCookie,以便断点总是像这样命中: if (AuthenticationHelper.IsAuthenticated()) { string[] userData = AuthenticationHelper.GetUserDataFromAuthCookie(); } 我确信浏览器正在存储cookies,因为当我使用保持登录选项时,我保持登录状态。但是,G

我在K10公司网站上工作。 在signexputton.ascx.cs上,我将调用移动到GetUserDataFromAuthCookie,以便断点总是像这样命中:

if (AuthenticationHelper.IsAuthenticated())
{
    string[] userData = AuthenticationHelper.GetUserDataFromAuthCookie();
}
我确信浏览器正在存储cookies,因为当我使用保持登录选项时,我保持登录状态。但是,GetUserDataFromAuthCookie始终返回null

这是否仅在使用WindowsLiveID对用户进行身份验证时有效

干杯

Rory

如果您查看仅在以下条件下可用的用户数据!String.isNullOrEmptyCMContext.CurrentUser.UserSettings.WindowsLiveID。helper只调用标准的asp.net方法来获取,除非您自己在中保存了一些内容—没有什么可获取的。我假设在使用WindowsLiveID时,用户数据中会保存一些信息。其他时候它都是空的。UserData是一个很有用的地方,用于放置用户的少量信息,这些信息通常是需要的。除非你把自己放在那里,否则它是空的