This is the minimal code (the code above contains some debugging information

if (!Page.IsPostBack)
{
        Uri ClearPassUri = new
Uri(@"https://cas.pepperdine.edu:8443/cas/clearPass";);

        string proxyTicket;

        try
        {
                proxyTicket =
CasAuthentication.GetProxyTicketIdFor(ClearPassUri.AbsoluteUri);
        }
        catch (InvalidOperationException ioe)
        {
                proxyTicket = "Invalid Request: " + ioe.Message;
        }
        catch (TicketValidationException tve)
        {
                proxyTicket = "Ticket Exception: " + tve.Message;
        }

        string clearPassRequest = ClearPassUri.AbsoluteUri + "?" + "ticket=" +
proxyTicket + "&" + "service=" + Server.UrlEncode(ClearPassUri.AbsoluteUri);

        string clearPassResponse;
        StreamReader reader = null;
        try
        {
                reader = new StreamReader(new 
WebClient().OpenRead(clearPassRequest));
                clearPassResponse = reader.ReadToEnd();
        }
        catch (Exception ex)
        {
                throw new HttpException(500, "Error getting response from 
clearPass at
URL: " + clearPassRequest + ". " + ex.Message, ex);
        }
        finally
        {
                if (reader != null)
                {
                        reader.Close();
                }
        }

        Response.Write(GetPassword(clearPassResponse));
}
-- 
View this message in context: 
http://jasig.275507.n4.nabble.com/Clearpass-DotNetCasClient-ticket-does-not-match-supplied-service-tp2215801p2217270.html
Sent from the CAS Developers mailing list archive at Nabble.com.

-- 
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-dev

Reply via email to