cancel
Showing results for 
Search instead for 
Did you mean: 

SAP driver problem

666

We have a problem with Sybase SAP driver update. We have a ASP.NET system deployed with SAP database driver, but whe we update this driver (Sap.Data.SQLAnywhere.v4.5.dll) to version 17.0.11.7458 on client test server (window server 2019 standart), we get the error:


Error time: 2024-05-08 13:24:48 Compilation date: 2024-05-08 13:12:56 User IP: ::1 User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like GeckoCookies: "Error: ErrorMessage : The type initializer for 'Sap.Data.SQLAnywhere.SAConnection' threw an exception. StackTrace: at Sap.Data.SQLAnywhere.SAConnection..ctor(String connectionString) at DBUtil.GetConnection() in C:\\Projects\\Backend\\WISP1.0\\projects\\Saikas.WISP.DBUtil\\DBUtil. cs:line 131 TraceBack:InnerException: System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited) at System.Diagnostics.NtProcessManag

Accepted Solutions (0)

Answers (1)

Answers (1)

MCMartin
Participant
0 Kudos

OpenProcess as the culprit: you do not have the rights to access your own process from the running code (might happen in webserver code)

That is unfortunately the static constructor of SAConnection so no way around it, it contains code to get the ProcessName of the current process and GetCurrentProcess() calls OpenProcess under the hood for which you need the appropriate rights.