当前位置:编程学习 > C#/ASP.NET >>

跪求 IIS + DB2数据库的问题,在线等


我在Microsoft Visual Studio 中测试连接局域网中的DB2数据库,是通的,但是我发布到IIS后,连接数据库就报错  ,请问是哪的原因呢,具体错误如下



IBM.Data.DB2.DB2Exception: ERROR [58005] [IBM][DB2.NET] SQL0902 An unexpected exception has occurred in  Process: 7984 Thread 58 AppDomain: 名称:/LM/W3SVC/1/ROOT/print_server-10-129864511411113429

无上下文策略。

 Function: SQLConnect

 CallStack:    在 System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)

   在 System.Environment.get_StackTrace()

   在 IBM.Data.DB2.DB2ConnPool.a(String A_0, Exception A_1, Boolean A_2)

   在 IBM.Data.DB2.DB2ConnPool.h.a(String A_0, IsolationLevel A_1, Int32 A_2, DB2Connection A_3, Int32& A_4, Int32& A_5)

   在 IBM.Data.DB2.DB2ConnPool.a(DB2Connection A_0, String A_1, a& A_2, Object& A_3)

   在 IBM.Data.DB2.DB2Connection.Open()

   在 WebService1.DB2Helper.PrepareCommand(DB2Command cmd, DB2Connection conn, DB2Transaction trans, CommandType cmdType, String cmdText, DB2Parameter[] cmdParms) 位置 E:\ljia\打印\PrintControl\PrintControl\WebService1\DBServer\DB2Helper.cs:行号 260

   在 WebService1.DB2Helper.ExecuteScalar(String connectionString, CommandType cmdType, String cmdText, DB2Parameter[] commandParameters) 位置 E:\ljia\打印\PrintControl\PrintControl\WebService1\DBServer\DB2Helper.cs:行号 220

   在 WebService1.DB2Helper.GetScalar(String mySql) 位置 E:\ljia\打印\PrintControl\PrintControl\WebService1\DBServer\DB2Helper.cs:行号 632

   在 WebService1.Service1.GetSingle(String sql) 位置 E:\ljia\打印\PrintControl\PrintControl\WebService1\Service1.asmx.cs:行号 44

   在 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

   在 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

   在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   在 System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)

   在 System.Web.Services.Protocols.WebServiceHandler.Invoke()

   在 System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()

   在 System.Web.Services.Protocols.SyncSessionlessHandler.ProcessRequest(HttpContext context)

   在 System.Web.Script.Services.ScriptHandlerFactory.HandlerWrapper.ProcessRequest(HttpContext context)

   在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

   在 System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)

   在 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)

   在 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)

   在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

   在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

   在 System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)

   在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

   在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) InnerException Message: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。 Check InnerException property for more detail.  SQLSTATE=58005 ---> System.AccessViolationException: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。

   在 IBM.Data.DB2.aa.a.SQLConnectADONET(IntPtr A_0, IntPtr& A_1, ao* A_2, IntPtr& A_3, a4& A_4)

   在 IBM.Data.DB2.DB2ConnPool.h.a(String A_0, IsolationLevel A_1, Int32 A_2, DB2Connection A_3, Int32& A_4, Int32& A_5)

   --- 内部异常堆栈跟踪的结尾 ---

   在 IBM.Data.DB2.DB2ConnPool.a(DB2Connection A_0, String A_1, a& A_2, Object& A_3)

   在 IBM.Data.DB2.DB2Connection.Open()

   在 WebService1.DB2Helper.PrepareCommand(DB2Command cmd, DB2Connection conn, DB2Transaction trans, CommandType cmdType, String cmdText, DB2Parameter[] cmdParms) 位置 E:\ljia\打印\PrintControl\PrintControl\WebService1\DBServer\DB2Helper.cs:行号 260

   在 WebService1.DB2Helper.ExecuteScalar(String connectionString, CommandType cmdType, String cmdText, DB2Parameter[] commandParameters) 位置 E:\ljia\打印\PrintControl\PrintControl\WebService1\DBServer\DB2Helper.cs:行号 220

   在 WebService1.DB2Helper.GetScalar(String mySql) 位置 E:\ljia\打印\PrintControl\PrintControl\WebService1\DBServer\DB2Helper.cs:行号 632

   在 WebService1.Service1.GetSingle(String sql) 位置 E:\ljia\打印\PrintControl\PrintControl\WebService1\Service1.asmx.cs:行号 44

 
--------------------编程问答-------------------- 不要沉了啊,有解决的,吗,还可以给分 --------------------编程问答-------------------- 是没人用过DB2,还是?有人解答吗 --------------------编程问答-------------------- 失望,有分都没人来解决
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,