I have a COM object written in C#, and loaded from native code via COM. To fulfill its job, it needs full filesystem access (not just under its AssemblyRoot). What is the proper way to ensure it has this? I'm getting an UnauthorizedAccessException when my code is loaded via COM (if I run the same code from the console, it has the access it needs). Thank you.
Asked
Active
Viewed 83 times
3
-
1Have you tried adding `[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]` attribute to your C# class exposed to COM? – noseratio Mar 06 '14 at 00:07
-
1See this question [Starting processes under specific credentials from a Windows service](http://stackoverflow.com/questions/21708133/starting-processes-under-specific-credentials-from-a-windows-service/21710091) – lsalamon Mar 06 '14 at 01:07
-
in-proc or out-of-proc? in-proc should have whatever access the process that loaded it has, out-of-proc usually does also, but can be tricky if single-instance and already running. – eselk Aug 27 '14 at 02:20