Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.
晕死,好像还是不行,太邪恶了。。
string path = "~/Config/View/xxx.xml";
string filepath = Path.Combine(HttpContext.Current.Server.MapPath(path));
XmlSerialization xml = new XmlSerialization();
var model = xml.Deserialize<ViewInfo>(filepath);
竟然不能用