gpt4 book ai didi

asp.net - FederatedAuthentication.WSFederationAuthenticationModule 在运行时为 null

转载 作者:行者123 更新时间:2023-12-02 13:38:54 25 4
gpt4 key购买 nike

我正在尝试订阅 Application_Start() 中的 RedirectingToIdentityProvider 事件,但 FederatedAuthentication.WSFederationAuthenticationModule 为 null

代码

protected void Application_Start()
{
FederatedAuthentication.WSFederationAuthenticationModule.RedirectingToIdentityProvider += WSFederationAuthenticationModule_RedirectingToIdentityProvider;
}

最佳答案

尝试这样做 - 对我有用。

void Application_Start()
{
FederatedAuthentication.ServiceConfigurationCreated += OnServiceConfigurationCreated;
}


void OnServiceConfigurationCreated(object sender, ServiceConfigurationCreatedEventArgs e)
{
FederatedAuthentication.WSFederationAuthenticationModule.RedirectingToIdentityProvider += WSFederationAuthenticationModule_RedirectingToIdentityProvider;
}

关于asp.net - FederatedAuthentication.WSFederationAuthenticationModule 在运行时为 null,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8937123/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com