Skip to content

Autofac.Configuration.dll is 'blocked' #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
chris-ray opened this issue May 30, 2014 · 0 comments
Open

Autofac.Configuration.dll is 'blocked' #2

chris-ray opened this issue May 30, 2014 · 0 comments

Comments

@chris-ray
Copy link

Since there is no npm module, I just dropped the built code straight into node_modules. Running a simple example doesn't work right away, it spits out this nasty message:

System.TypeInitializationException: The type initializer for 'EdgeCompiler' 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 EdgeCompiler..cctor()
   --- End of inner exception stack trace ---
   at EdgeCompiler..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at ClrFunc.Initialize(Handle<v8::Value>* , Arguments* args)

Which basically says that one or more of the assemblies being loaded is "blocked" and needs to be unblocked. I found that the "Autofac.Configuration.dll" seemed to be the only blocked assembly. Unblocked it and everything started to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant