更新时间:1970-01-01 07:57:48
AD FS做一些操作与HTTP请求所以***的选择,我发现正在使用的HttpContext项目集合共享数据。
AD FS does some manipulation with the HTTP request so the best option I've found is using the HttpContext Items collection to share data.
因此,从HomeRealmDiscovery页面,与设置的值:
So from the HomeRealmDiscovery page, set the values with:
var context = HttpContext.Current;
string someValue = "someValue";
ComplexObject someOtherValue = new ComplexObject();
context.Items.Add("key", someValue);
context.Items.Add("key2", someOtherValue);
然后在FormsLoginPage,以获取值:
And then in the FormsLoginPage, get the values with:
var context = HttpContext.Current;
var value = context.Items["key"] as string;
var otherValue = context.Items["key2"] as ComplexObject;
希望这有助于。