mirror of
https://github.com/1Remote/1Remote.git
synced 2026-04-25 13:36:03 +03:00
[GH-ISSUE #159] System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. #2055
Labels
No labels
area-configuration
area-ct-app
area-ct-rdp
area-ct-remoteapp
area-ct-ssh
area-ct-vnc
area-launcher
area-list
area-tags
area-teamwork
bug
chore
dependencies
general-build/ci
general-performance
general-refactor
general-security
general-supportive
general-ux
meta-documentation
meta-enhancement
meta-enhancement
meta-feature
meta-help-wanted
meta-unknown-error
priority-hi
priority-low
pull-request
question
resolution-duplicate
resolution-invalid
resolution-wontfix
stale
task-put-off
task-still-considering
task-working-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/1Remote#2055
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @devscheffer on GitHub (Oct 27, 2021).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/159
Originally assigned to: @VShawn on GitHub.
Describe the bug
When I click on the exe file not is happening. It doesnt start the app.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
program to start.
Desktop (please complete the following information):
@VShawn commented on GitHub (Oct 28, 2021):
1st did you install the requirement?
https://dotnet.microsoft.com/download/dotnet-framework/net48
2nd if requirement is installed
please check
C:\Users\**YOUR NAME**\AppData\Roaming\PRemoteMIf there some log.md file existed, please show me to check what happend.
@jfbleach commented on GitHub (Nov 15, 2021):
I am having the same issue: Here is the log contents.
2021-11-15T09:56:16.0138634-08:00[ThreadId:0000000001] Fatal System.TypeInitializationException: The type initializer for 'PRM.App' threw an exception. ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String path)
at VariableKeywordMatcher.Builder.LoadProviders()
at VariableKeywordMatcher.Builder.Build(IEnumerable`1 enabledProviderNames, Boolean isCaseSensitive)
at PRM.Core.Model.KeywordMatchService..ctor() in C:\projects\premotem-release-by-tag-automatically\PRM.Core\Model\KeywordMatchService.cs:line 48
at PRM.Core.Model.PrmContext..ctor() in C:\projects\premotem-release-by-tag-automatically\PRM.Core\Model\PrmContext.cs:line 20
at PRM.App..cctor() in C:\projects\premotem-release-by-tag-automatically\PRemoteM\App.xaml.cs:line 30
--- End of inner exception stack trace ---
at PRM.App.App_OnStartup(Object sender, StartupEventArgs startupEvent) in C:\projects\premotem-release-by-tag-automatically\PRemoteM\App.xaml.cs:line 228
at System.Windows.Application.OnStartup(StartupEventArgs e)
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at PRM.App.App_OnStartup(Object sender, StartupEventArgs startupEvent) in C:\projects\premotem-release-by-tag-automatically\PRemoteM\App.xaml.cs:line 228
at System.Windows.Application.OnStartup(StartupEventArgs e)
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
2021-11-15T09:56:16.0854102-08:00[ThreadId:0000000001] Fatal System.TypeInitializationException: The type initializer for 'PRM.App' threw an exception. ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
at System.Reflection.Assembly.LoadFile(String path)
at VariableKeywordMatcher.Builder.LoadProviders()
at VariableKeywordMatcher.Builder.Build(IEnumerable`1 enabledProviderNames, Boolean isCaseSensitive)
at PRM.Core.Model.KeywordMatchService..ctor() in C:\projects\premotem-release-by-tag-automatically\PRM.Core\Model\KeywordMatchService.cs:line 48
at PRM.Core.Model.PrmContext..ctor() in C:\projects\premotem-release-by-tag-automatically\PRM.Core\Model\PrmContext.cs:line 20
at PRM.App..cctor() in C:\projects\premotem-release-by-tag-automatically\PRemoteM\App.xaml.cs:line 30
--- End of inner exception stack trace ---
at PRM.App.get_Window() in C:\projects\premotem-release-by-tag-automatically\PRemoteM\App.xaml.cs:line 28
at PRM.App.CloseAllWindow() in C:\projects\premotem-release-by-tag-automatically\PRemoteM\App.xaml.cs:line 320
at PRM.App.OnUnhandledException(Exception e) in C:\projects\premotem-release-by-tag-automatically\PRemoteM\App.xaml.cs:line 39
at PRM.App.<>c.b__17_0(Object o, DispatcherUnhandledExceptionEventArgs args) in C:\projects\premotem-release-by-tag-automatically\PRemoteM\App.xaml.cs:line 61
at System.Windows.Threading.Dispatcher.CatchException(Exception e)
at System.Windows.Threading.Dispatcher.CatchExceptionStatic(Object source, Exception e)
at System.Windows.Threading.ExceptionWrapper.CatchException(Object source, Exception e, Delegate catchHandler)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at PRM.App.Main()
at PRM.App.get_Window() in C:\projects\premotem-release-by-tag-automatically\PRemoteM\App.xaml.cs:line 28
at PRM.App.CloseAllWindow() in C:\projects\premotem-release-by-tag-automatically\PRemoteM\App.xaml.cs:line 320
at PRM.App.OnUnhandledException(Exception e) in C:\projects\premotem-release-by-tag-automatically\PRemoteM\App.xaml.cs:line 39
at PRM.App.<>c.b__17_0(Object o, DispatcherUnhandledExceptionEventArgs args) in C:\projects\premotem-release-by-tag-automatically\PRemoteM\App.xaml.cs:line 61
at System.Windows.Threading.Dispatcher.CatchException(Exception e)
at System.Windows.Threading.Dispatcher.CatchExceptionStatic(Object source, Exception e)
at System.Windows.Threading.ExceptionWrapper.CatchException(Object source, Exception e, Delegate catchHandler)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at PRM.App.Main()
@jfbleach commented on GitHub (Nov 15, 2021):
I was able to cure this but downloading https://docs.microsoft.com/en-us/sysinternals/downloads/streams
and running
streams.exe -d -s .
In the PRemotMxxxxxx folder
@VShawn commented on GitHub (Nov 26, 2021):
@jfbleach thx for your solution