请各路高手走过路过,给指教一下!调用WebServices, SPCControllerWS.SPCSrvWS spcws = new SPCUDRVExt.SPCControllerWS.SPCSrvWS();出现以下错误:
System.AccessViolationException: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
   在 System.Signature._GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, IntPtr fieldHandle, IntPtr methodHandle, IntPtr declaringTypeHandle)
   在 System.Signature..ctor(RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
   在 System.Reflection.RuntimeMethodInfo.get_Signature()
   在 System.Reflection.RuntimeMethodInfo.get_ReturnType()
   在 System.Web.Services.Protocols.LogicalMethodInfo.IsBeginMethod(MethodInfo methodInfo)
   在 System.Web.Services.Protocols.LogicalMethodInfo.Create(MethodInfo[] methodInfos, LogicalMethodTypes types, Hashtable declarations)
   在 System.Web.Services.Protocols.SoapClientType.GenerateXmlMappings(Type type, ArrayList soapMethodList, String serviceNamespace, Boolean serviceDefaultIsEncoded, ArrayList mappings)
   在 System.Web.Services.Protocols.SoapClientType..ctor(Type type)
   在 System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
   在 SPCUDRVExt.SPCControllerWS.SPCSrvWS..ctor()
   在 SPCUDRVExt.SPCUDRVExtForm.SPCUDRVExtForm_Load(Object sender, EventArgs e)

解决方案 »

  1.   

    这不是Webservice的问题,而是可能你调用非托管DLL引发的问题。._GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, IntPtr fieldHandle, IntPtr methodHandle, IntPtr declaringTypeHandle)
      

  2.   

    补充一下,这是个Winform程序调用WebServices. 运行的系统为Win7, .Netframework2.0
      

  3.   

     to isjoe,  能具体讲一下么? 
      

  4.   

    这个问题比较奇怪,感觉系统或者.net runtime坏了似的。
      

  5.   

    是Webservices的版本不对。