Exception Handling for Cookie Authentication

rated by 0 users
This post has 1 Reply | 1 Follower

zoul
Not Ranked
Posts 9
Points 75
By: zoul
Posted: Mon, Apr 2 2007 2:44 PM

I am working with the Cookie Authentication Module, and in some cases we are experiencing problems where our members cookies become corrupt -- the cookie is touched by a number of sites, outside of the Community Server code ... and I'm working on tracking down a much better solution, however ... in the interim, I was wondering if there was a way to properly 'catch' the exceptions thrown by the Security Module when it fails to decrypt the cookie contents ...


Scenerio:
    user has cookie but cookie data is empty

Result:
    CS throws a "Server Error", and redirecting 500 messages to error.aspx fails to work

Wanted:
    I would like to be able to gracefully handle this 'failed login' and just delete the cookie so the user can re-authenticate, rather then displaying an error message of any sort -- however, I am not quite sure where I would catch this exception ...
 

-- David Higgins
 
Xander
Top 50 Contributor
Posts 322
Points 3,765
CS Developers
By: Xander
Posted: Tue, Apr 3 2007 8:19 AM In reply to

Hi David,

If you're using the SDK  version of Community Server, the place to catch the error is going to be in the Application_AuthenticateRequest() method of the CSHttpModule in the Components project. 

Hope this helps,

Xander 

 
  • Post Points: 5 |
Page 1 of 1 (2 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com