在我们的ASP中。网络项目,我正在使用' 肯托认证服务
目前,我们在页面中提供了一个锚标记,其中href为: href=@Url。内容(“~/AuthServices/SignIn?idp=”+实体ID)
这非常好,一旦我们单击锚标记,它就会重定向到Identity Provider: http://localhost:17009//SamplePath/AuthServices/SignIn?idp=http://stubidp.kentor.se/Metadata
但我们需要实现的是不使用锚标记,我们直接在浏览器中输入站点URL地址,它应该自动重定向到Identity Provider。
使用HttpModule时,您可以使用web中的表单身份验证设置。config将未经身份验证的请求重定向到登录序列。
<authentication mode="Forms"> <forms loginUrl="~/AuthServices/SignIn"></forms> </authentication>