Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Right click on the ExampleWebsite app and selecting Select as Startup Project.
  2. Right click on the DotNetCasClient app and select Build.
  3. Add a Web.config file to the ExampleWebsite. Copy the contents of web.config.sample file into Web.config and modify the following sections:

 

Code Block
languagehtml/xml
titleWeb.config
<casClientConfig
  casServerLoginUrl="https://<your-full-machine-name>:8443/cas/login"
  casServerUrlPrefix="https://<your-full-machine-name>:8443/cas/"
  serverName="https://<your-full-machine-name>"
  notAuthorizedUrl="~/NotAuthorized.aspx"
  cookiesRequiredUrl="~/CookiesRequired.aspx"
  redirectAfterValidation="true"
  gateway="false"
  renew="false"
  singleSignOut="true"
  ticketTimeTolerance="5000"
  ticketValidatorName="Cas20"
  proxyTicketManager="CacheProxyTicketManager"
  serviceTicketManager="CacheServiceTicketManager"
  gatewayStatusCookieName="CasGatewayStatus" 
 />

<authentication mode="Forms">
  <forms
    loginUrl="https://<your-full-machine-name>:8443/cas/login"
    timeout="90"
    defaultUrl="~/Default.aspx"
    cookieless="UseCookies"
    slidingExpiration="true"
  />
</authentication>

...

Info
titleFull Computer Name
You can retrieve the fully qualified machine name by pressing WinKey+Pause and noting the value for "Full computer name".

...

Right click on ExampleWebsite and select Publish Website. From the dialog, click the browse button and navigate to Local IIS group. Then, select Default Website.

Create IIS .NET SSL Certificate

...

Code Block
languagejava
keytool -import -file client.cer -keystore "%JAVA_HOME%"\jre\lib\security\cacerts -alias dotnet

 

When prompted, enter “yes” to trust and import the certificate to the JVM keystore.

 

Import JVM SSL Certificate to IIS

  1. Open Internet Explorer and bring up the Options Dialog. Then, navigate to the Content tab. Click on the Certificates and select the Trusted Root Certification Authorities.
  2. Click on the Import button and walkthrough the wizard. Locate the server certificate that you created for the tomcat instance (i.e tomcat.crt). Finally, make sure the certificate is placed inside the Trusted Root Certification Authorities. 

...

Code Block
languagehtml/xml
titleCAS Server Credentials
<bean class="org.jasig.cas.adaptors.generic.AcceptUsersAuthenticationHandler">
  <property name="users">
    <map>
      <entry>
<key>
<value>admin</value>
</key>
<value>admin</value>
        <key><value>admin</value></key>
        <value>admin</value>
      </entry>
      <entry>
<key>
<value>bob</value>
</key>
<value>bob</value>

        <key><value>bob</value></key>
        <value>bob</value>
       </entry>
   </map>
  </property>
</bean>

Run

First, make sure you have the CAS server up and running and you can log into CAS using the above credentials.

...