on ‎2020 Jun 10 2:32 PM
Hi,
I am using the Sap.Data.Hana.v4.5.dll 64 bit DLL (version 2.4.171.0, which I think is the latest), in a 64 bit classic asp.net 4.8 application in c#, against Hana 2.
The application works ok if the application pool runs under the LocalSystem identity in IIS. This is an unsafe setup. If I set the identity as ApplicationPoolIdentity, which is the recommended security setup, as soon as I try to open the HanaConnection I get a System.Security.SecurityException: Requested registry access is not allowed exception.
This is the stack trace:
System.ThrowHelper.ThrowSecurityException(ExceptionResource resource) +60
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +14174075
System.Environment.GetEnvironmentVariable(String variable, EnvironmentVariableTarget target) +277
Sap.Data.Hana.HanaUnmanagedDll.SearchNativeDlls() +300
Sap.Data.Hana.HanaUnmanagedDll..ctor() +18
Sap.Data.Hana.HanaUnmanagedDll.get_Instance() +133
Sap.Data.Hana.HanaConnection..cctor() +56
Is there a workaround for this (besides running the IIS worker process as LocalSystem)?
Thanks.
Request clarification before answering.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.