Integrating CAS Proxying with Forms Authentication in ASP.Net 2.0
To set up CAS authentication in ASP.Net is a relatively simple process if you don't implement Forms Authentication and do NOT require your application to act as a CAS proxy.
The .Net assembly (DLL) and source code needed for this article can be downloaded here. Just drop it in your project's bin folder.
For an example of how to do CAS proxying with classic ASP, see me other article CAS Proxying with Classic ASP
First drop the CASAuthentication.dll (attached) into your project's bin folder. Then, In Web.config, make the following changes:
The CAS proxier - (Your main default page)
The CAS callback Url (This would be the same application page specified in the pgtUrl attribute in the call to InvokeCASProxy method shown above) - This assumes that your main application (the CAS proxier) and callback Url are part of the same application so that they can share application specific variables. If the callback Url is NOT part of the same application, then you must handle storing/retrieving the pgtIou/pgtId pair yourself. (e.g. store them in an external database).
The CAS Proxy (This would be the same application specified in the ProxyAppUrl attribute in the call to InvokeCASProxy method shown above)