You need to register the module in your web.config differently depending on 
whether you are using integrated mode (only available in newer versions of IIS) 
or classic mode.  In integrated mode, it should be registered under 
system.webserver/modules, in classic mode it should be registered under 
system.web/httpModules.  You can see it under the "Register 
CasAuthenticationModule" section of 
https://wiki.jasig.org/display/casc/.net+cas+client.  I would verify that that 
is correct.

> -----Original Message-----
> From: Waldbieser, Carl [mailto:[email protected]]
> Sent: Monday, September 08, 2014 12:46 PM
> To: [email protected]
> Subject: Re: [cas-user] Redirect page after authenticated
> 
> Michelle,
> 
> The source code file "DotNetCasClient/CasAuthenticationModule.cs" has
> some comments that may partially explain why you are seeing "ReturnUrl"
> instead of "service".  It seems like the ASP.NET framework is not
> intercepting the request as it is routed to FormsLoginUrl.  Do you have
> debugging turned on?  That would probably help you determine what
> configuration you may be missing.
> 
> You can try hitting the CAS server directly with:
> 
>    https://CASServerName/cas/login?service=https://myWebServerName
> 
> to see if service ticket validation is working.
> 
> Thanks,
> Carl
> 
> ----- Original Message -----
> From: "Michelle Zhang" <[email protected]>
> To: [email protected]
> Sent: Monday, September 8, 2014 3:09:14 PM
> Subject: Re: [cas-user] Redirect page after authenticated
> 
> Carl,
> 
> I made such change now:
> <casClientConfig casServerLoginUrl="https://CASServerName/cas/login
> <https://CASEServerName/cas>"
>                    casServerUrlPrefix="https://CASServerName/cas
> <https://CASEServerName/cas>"
>                    serverName="https://myWebServerName
> <https://CASEServerName/cas>"
>                    notAuthorizedUrl="~/Failed.aspx"
>                    cookiesRequiredUrl="
> https://myWebServerName/Account/Login.aspx";
>                    redirectAfterValidation="true"
>                    renew="false" singleSignOut="true"
>                    ticketValidatorName="Cas20"
>                    serviceTicketManager="CacheServiceTicketManager"/>
> 
> and still have the problem.
> 
> Thanks again!
> 
> Michelle
> 
> 
> On Mon, Sep 8, 2014 at 3:01 PM, Waldbieser, Carl
> <[email protected]>
> wrote:
> 
> > Michelle,
> >
> > It looks like "serverName" in "casClientConfig" ought to be "
> > https://myWebServerName";.  From the instructions:
> >
> >   Host name of the server hosting this application. This is used to
> > generate URLs that will be sent to the CAS server for redirection.
> >
> > Thanks,
> > Carl
> >
> > ----- Original Message -----
> > From: "Michelle Zhang" <[email protected]>
> > To: [email protected]
> > Sent: Monday, September 8, 2014 2:50:34 PM
> > Subject: Re: [cas-user] Redirect page after authenticated
> >
> > Carl,
> >
> > Thank you for checking for me!  I made the change, now the code in
> > web.config shows:
> > <authentication mode="Forms">
> >       <forms loginUrl="https://CASServerName/cas/login
> > <https://CASEServerName/cas>" timeout="30"
> >              defaultUrl="https://myWebServerName/Account/Login.aspx";
> >              cookieless="UseCookies"
> >              slidingExpiration="true"
> >              path="/SPOT/"
> >              name=".ASPXFORMSAUTH"/>
> >     </authentication>
> >
> > Same to the casClientConfig:
> > <casClientConfig casServerLoginUrl="https://CASServerName/cas/login
> > <https://CASEServerName/cas>"
> >                    casServerUrlPrefix="https://CASServerName/cas
> > <https://CASEServerName/cas>"
> >                    serverName="https://CASServerName
> > <https://CASEServerName/cas>:8443"
> >                    notAuthorizedUrl="~/Failed.aspx"
> >                    cookiesRequiredUrl="
> > https://myWebServerName/Account/Login.aspx";
> >                    redirectAfterValidation="true"
> >                    renew="false" singleSignOut="true"
> >                    ticketValidatorName="Cas20"
> >                    serviceTicketManager="CacheServiceTicketManager"/>
> >
> > When I upload and test again, nothing changed....
> >
> >
> > Michelle
> >
> > On Mon, Sep 8, 2014 at 2:42 PM, Waldbieser, Carl
> > <[email protected]>
> > wrote:
> >
> > > Michelle,
> > >
> > > Shouldn't your loginUrl be "https://CASEServerName/cas/login";?
> > > It should match the "casServerLoginUrl" in your "casClientConfig"
> > > section [1]
> > >
> > > Thanks,
> > > Carl
> > >
> > > [1] https://wiki.jasig.org/display/casc/.net+cas+client
> > >
> > > ----- Original Message -----
> > > From: "Michelle Zhang" <[email protected]>
> > > To: [email protected]
> > > Sent: Monday, September 8, 2014 2:12:02 PM
> > > Subject: Re: [cas-user] Redirect page after authenticated
> > >
> > > Dear Carl,
> > >
> > > Thank you very much for the reply!  I do not see the "service"
> > > parameter
> > on
> > > the URL.  The URL is just showing as:
> > > https://CASEServerName/cas/login?ReturnUrl=%2f
> > >
> > > In my web.config file, I have set the url in the "defaultUrl"
> attribute:
> > >
> > >  <authentication mode="Forms">
> > >       <forms loginUrl="https://CASEServerName/cas"; timeout="30"
> > >
> defaultUrl="https://myWebServerName/Account/Login.aspx";
> > >              cookieless="UseCookies"
> > >              slidingExpiration="true"
> > >              path="/SPOT/"
> > >              name=".ASPXFORMSAUTH"/>
> > >       <!--path="/ApplicationName/"-->
> > >     </authentication>
> > >
> > > Do you know where else should I set the service parameter?
> > >
> > >
> > > Michelle
> > >
> > >
> > > On Mon, Sep 8, 2014 at 2:05 PM, Waldbieser, Carl
> > > <[email protected]
> > >
> > > wrote:
> > >
> > > > Michelle,
> > > >
> > > > When you are sent to the CAS login page, what is the value of the
> > > > `service` parameter on the URL?  That is the URL you will be
> > > > redirected
> > > to
> > > > on successful login.  If that URL is *not* correct, your CAS
> > > > client is sending the wrong service parameter.
> > > >
> > > > If it is correct, you should check to see if your web app is
> > redirecting
> > > > from the service URL to the final URL.
> > > >
> > > > Thanks,
> > > > Carl Waldbieser
> > > > Lafayette College
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Michelle Zhang" <[email protected]>
> > > > To: [email protected]
> > > > Sent: Monday, September 8, 2014 10:42:22 AM
> > > > Subject: [cas-user] Redirect page after authenticated
> > > >
> > > > Hi there,
> > > >
> > > > I'm a .Net developer and now just started to work with CAS.  I
> > > > have
> > made
> > > > associate changes on the web.config files so now after I typed in
> > > > the
> > > url (
> > > > https://servername), I'm directed to the CAS log in page. After I
> > logged
> > > > in, I'm supposed to be redirected to my default page which
> > > > specified in web.config file:
> > > >   <files>
> > > >         <clear/>
> > > >         <add value="Account/Login.aspx"/>
> > > >       </files>
> > > > However I am always being directed to the same "log in
> successful"
> > > > page with the url showing as:
> > > >
> > > > https://servername/cas/login?ReturnUrl=%2f
> > > >
> > > > Any suggestions?
> > > > <[email protected]>
> > > >
> > > > --
> > > > You are currently subscribed to [email protected] as:
> > > > [email protected]
> > > > To unsubscribe, change settings or access archives, see
> > > > http://www.ja-sig.org/wiki/display/JSG/cas-user
> > > >
> > > > --
> > > > You are currently subscribed to [email protected] as:
> > > > [email protected]
> > > > To unsubscribe, change settings or access archives, see
> > > > http://www.ja-sig.org/wiki/display/JSG/cas-user
> > > >
> > >
> > >
> > >
> > > --
> > > Michelle Zhang
> > > Floyd Institute Center for Opinion Research Franklin & Marshall
> > > College P.O. Box 3003 Lancaster PA 17604-3003
> > > Phone: (717) 358-4764
> > > [email protected]
> > >
> > > --
> > > You are currently subscribed to [email protected] as:
> > > [email protected]
> > > To unsubscribe, change settings or access archives, see
> > > http://www.ja-sig.org/wiki/display/JSG/cas-user
> > >
> > > --
> > > You are currently subscribed to [email protected] as:
> > > [email protected]
> > > To unsubscribe, change settings or access archives, see
> > > http://www.ja-sig.org/wiki/display/JSG/cas-user
> > >
> >
> >
> >
> > --
> > Michelle Zhang
> > Floyd Institute Center for Opinion Research
> > Franklin & Marshall College
> > P.O. Box 3003
> > Lancaster PA 17604-3003
> > Phone: (717) 358-4764
> > [email protected]
> >
> > --
> > You are currently subscribed to [email protected] as:
> > [email protected]
> > To unsubscribe, change settings or access archives, see
> > http://www.ja-sig.org/wiki/display/JSG/cas-user
> >
> > --
> > You are currently subscribed to [email protected] as:
> > [email protected]
> > To unsubscribe, change settings or access archives, see
> > http://www.ja-sig.org/wiki/display/JSG/cas-user
> >
> 
> 
> 
> --
> Michelle Zhang
> Floyd Institute Center for Opinion Research
> Franklin & Marshall College
> P.O. Box 3003
> Lancaster PA 17604-3003
> Phone: (717) 358-4764
> [email protected]
> 
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see http://www.ja-
> sig.org/wiki/display/JSG/cas-user
> 
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see http://www.ja-
> sig.org/wiki/display/JSG/cas-user

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to