I'm using the same components to access some dll in windows\system32. When I do it from exe, it works. However, when I am doing it from an IIS application, it fails - I do not know exactly what the error is because I am using third party components. Do I have set up the IIS WCF Application in a specific way to access the dll in windows\system32? I tried to explicitly enter the user with which the physical path was access but it did not help...
Asked
Active
Viewed 203 times
2
-
What is the status code in IIS logs ? 401 or 500 ? – Ravi A. Aug 29 '16 at 02:59
-
none. i can access my components, it's a third partry component executed by the wcf service that throws an error. I cannot debug it so it is my guess that maybe the process doesn't have rights. – Greg Aug 29 '16 at 14:30
-
it WORKS for IIS Express when I enter the full path of the dll in windows\system32 however not in local (full) IIS – Greg Aug 29 '16 at 14:47
-
1Change the application pool identity to Local System (this is equivalent to Admin) and see if it is working. If it works then put back the App pool identity to default (running app pool in Local System is not recommended) and use Process Monitor to check the Access Denied issue as explained here https://blogs.technet.microsoft.com/chad/2009/12/30/how-to-use-sysinternals-process-monitor-and-process-explorer-to-troubleshoot-sharepoint/. If it's not working under Local System it's mostly not permissions issue – Ravi A. Aug 29 '16 at 17:29
-
Is your application pool running the 64bit or 32bit .Net Framework? I had an issue recently where part of a web app errored out because the application pool was set to 32 bit and I was expecting 64. I wonder if the DLL you are trying to load has a mismatch. – Joel Oct 25 '16 at 12:34
1 Answers
0
Im not sure the giving IIS the rights is the way to go.
I would split the application into two parts:
1: A windows service hosting the components that need the special access, exposing an endpoint towards the IIS web app.
2: The the web app , that will call the service to get the work done.

Menahem
- 3,974
- 1
- 28
- 43