当前位置: 代码迷 >> C# >> 未处理System.ExecutionEngineException Message: “System.ExecutionEngineException”类型的解决办法
  详细解决方案

未处理System.ExecutionEngineException Message: “System.ExecutionEngineException”类型的解决办法

热度:40   发布时间:2016-05-05 02:35:09.0
未处理System.ExecutionEngineException Message: “System.ExecutionEngineException”类型的
[size=16px]using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ConsoleApplication1.localhost;//我添加了服务引用,获取里面的数据,为了安全我就不写地址
using System.Web;
namespace ConsoleApplication1
{
    class Program
    {
       static string handler;
     static string time_str;
     
        static void Main(string[] args)
        {
            localhost.PlatformService src = new PlatformService();
            handler = src.getPermission("ssss","njupt1");//访问数据,调用方法参数需要允许后的一句柄
            time_str = src.getLatestSaveTime(handler, 1);//获得一个string
            try
            {
                Console.WriteLine(handler);//输出句柄
                Console.WriteLine(time_str);
            }
            catch (Exception e)
            { Console.WriteLine(e.Message); }
         
        } 
    }
}
错误:“System.AccessViolationException”类型的未经处理的异常在 mscorlib.dll 中发生 

其他信息: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。

------解决思路----------------------
参考下这里的解决方案:http://blog.csdn.net/xuehuic/article/details/7682039
  相关解决方案