网上可以下载DotNetCasClient类库 以及ExampleWebSite运用实例 在VS 中加载即可测试
在VS中测试都很顺利,但发布到IIS上,会遇到定向循环问题,这个问题困扰了几天,测试了很多网上的解决办法,都没有彻底解决,不过在这个过程倒是对cas认证流程有了更深刻的理解。
1.在新建项目中,把编译的DotNetCasClient复制到项目bin目录
2. web.config中相关配置
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="casClientConfig" type="DotNetCasClient.Configuration.CasClientConfiguration, DotNetCasClient"/>
</configSections>
<connectionStrings>
...
</connectionStrings>
<casClientConfig
casServerLoginUrl="https://author.linbsoft.com:8443/cas/login"
casServerUrlPrefix="https://author.linbsoft.com:8443/cas"
serverName="http://net.linbsoft.com/casmytest"
notAuthorizedUrl="~/NotAuthorized.aspx"
cookiesRequiredUrl="~/CookiesRequired.aspx"
redirectAfterValidation="true"
gateway="false"
renew="false"
singleSignOut="true"
ticketTimeTolerance="500

最低0.47元/天 解锁文章
7971

被折叠的 条评论
为什么被折叠?



