This an example problem to illustrates my point. I'm not looking for a solution to this problem but instead the general idea behind it.
Lets just say I've got a project that lets people load in dynamic assemblies -- the idea being "plug-ins". Lets say it runs on a Web Server. They inherit from the abstract plugin class and define a few methods... but one of them does this...
public class SomePlugin : PluginBaseClass {
//Some method that is supposed to update the
//the plugin information
public virtual void Update() {
HttpContext.Current.Response.Redirect("http://new-website.com");
}
}
I wouldn't want to allow a dynamic assembly to have access to something like that -- but since it is static, what can you do?
I'm not sure how you lock down assemblies, but it seems to me that you can't possibly cover all of your bases. You still want them to be able to create classes and have access to some things, but not others.
Any suggestions for protecting your static information in .NET from dynamic assemblies?