godaddy虚拟主机 读取xml文件出错,有没有人知道怎么解决?

解决方案 »

  1.   

    Security ExceptionDescription: 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.
      

  2.   

    你那个XML文件的信任程度不够,也就是说你的虚拟机的安全程度设定高了,不允许此操作。
      

  3.   

    你那个XML文件的信任程度不够,也就是说你的虚拟机的安全程度设定高了,不允许此操作。
      

  4.   

    要使用Server.MapPath("~/xxx.xml")得到路径,你是怎么写的?
      

  5.   

    原来加个<trust level="Full" originUrl="" />就可以了
      

  6.   

    晕死,好像还是不行,太邪恶了。。
    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);
    竟然不能用