I often run into code access security in the "real world", often when I least expect it. And somehow SilverLight would be a great application in the real world if it weren’t for Silverlight to decide not to use CAS at all.
Hosting Providers
Where you see this in action, a secure environment is required: ASP.NET itself, but ASP.NET hosting providers use a modified security model to prevent intrusion into their precious systems. I know that Webhost4Life uses this (there is no information on it, but I worked with them, it is there, really). Looking further, other ASP.NET hosting providers do the same, but they are not very clear about this: the stream on godaddy.com does not change CAS (and there is no clarity about what is supported and what is not) or is this a related discussion 1 and 1 . Some cloud hosting sites (rackspacecloud) took this a little further and "worked with Microsoft for a modified full level of trust," whatever that is.
In short: if you find an ASP.NET host, most likely they used CAS so you don't do what you don't need to do. They can even use it, making the difference between the “basic” (many restrictions) hosting and the “enterprise” hosting (several restrictions), which gives CAS a different meaning.
Other CAS Applications
So much for a few real-life situations that I have encountered. The recent project I did had something similar: allow the user to download the library and test it for performance ("who makes the best algorithm"). Needless to say, we really need CAS. Other examples or interesting resources:
For any situation where you simply completely control yourself, you create your own application and code (or create it) and completely control your system, I don’t think that you will need CAS too often. This is more than what you would use at the moment when you can run the code from less reliable sources (which basically means everything that is not in your full control).
CAS vs ClickOnce
The default CAS settings limit the ability to run code from a network share or other non-local sources. This makes sense, but severe restrictions make it difficult to have a central repository for a distributed application .. NET 2.0 introduced ClickOnce, which was supposed to increase security ( discussion here ).
ClickOnce uses CAS so that the program does not call system functions. Therefore, I believe that this is perhaps the most famous application that uses CAS.
Point: you need to understand CAS in order to be able to create something that can be launched directly from a shared resource, or you ignore all this and use ClickOnce.
Microsoft CAS Survey
In 2005, Microsoft called a survey to find out why CAS was so unpopular, hoping to improve it so that it becomes more applicable. Unfortunately, I could not find the results of the survey, and then this post details in some detail why CAS is not used enough.
CAS in another world
This post, however, points to an intriguing niche: CAS applies to another world: Unix / Linux. They do not call it CAS, instead BitFrost . How it is for a real application: The One Laptop per Child project , which relies on BitFrost as a replacement for the traditional Unix security model.
Update: a section on CAS on Unix / Linux as BitFrost and a poll section.
Update: added CAS vs ClickOnce section
Update: Added a list of resources using CAS (and an apology for all these updates in line!)