未处理System.ExecutionEngineException Message: “System.ExecutionEngineException”类型的解决办法
未处理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.****.net/xuehuic/article/details/7682039
[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.****.net/xuehuic/article/details/7682039