mattjohnsonpint/SimpleImpersonation

Getting System.IO.FileLoadException if system trys to load dll inside runas

timctrahan opened this issue · 1 comments

If I do the Impersonation.RunAsUser and issue a command that results in an attempt to load a dll, I always get a system.io.fileloadexception...

This even occurs if I do a console.writeline within the block before issuing a console.writeline beforehand... What am I missing?

Unhandled exception. System.IO.FileLoadException:
File name: 'Microsoft.Extensions.Caching.Memory, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

As of version 4.0.0, this library simply exposes a SafeAccessTokenHandle that can be used with WindowsIdentity.RunImpersonated and similar methods. Thus, any further discussion about what works within such impersonated code is better served at https://github.com/dotnet/runtime/issues. Thanks.