【发布时间】:2015-03-17 00:09:51
【问题描述】:
我想避免在 web.config 中有节点,因此在 OnAuthenticateRequest 事件中动态设置 Issuer 和 Realm。但我收到错误“system.argumentexception:id0006:输入字符串参数为空或空。参数名称:颁发者”
我在引发 OnAuthenticateRequest 事件之前收到此错误。我在这里想念什么?
【问题讨论】:
我想避免在 web.config 中有节点,因此在 OnAuthenticateRequest 事件中动态设置 Issuer 和 Realm。但我收到错误“system.argumentexception:id0006:输入字符串参数为空或空。参数名称:颁发者”
我在引发 OnAuthenticateRequest 事件之前收到此错误。我在这里想念什么?
【问题讨论】:
AFAIK,您需要在开始验证之前提供配置。这可以在 web.config 中完成。您还可以利用事件 FederatedAuthentication.FederationConfigurationCreated += FederatedAuthenticationOnFederationConfigurationCreated;
开始提供您自己的配置。
【讨论】: