Code Access Security on a per-view ASP.NET MVC basis
问题 My ASP.NET MVC application includes a number of View files that are editable by the end-user (they're stored in a database and loaded via a VirtualPathProvider). I'd like to allow my users to edit their view files, however I'm wary of the security implications. Is there any way I can enforce some kind of code-access-security that ensures that any code in the view cannot perform any dangerous tasks (i.e. minimum trust, it can only access the database via a passed-in repository object and