Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: The type initializer for 'Microsoft.ClearScript.Util.AssemblyHelpers' threw an exception

$
0
0
hello, i have this script:
engine.AddHostObject("lib", new HostTypeCollection("mscorlib", "System.Core"));
this script will be ok in a ConsoleApplication.exe. but if i write this code in mvc and deploy to iis7.5/win2008r2, this will throw an exception:
The type initializer for 'Microsoft.ClearScript.Util.AssemblyHelpers' threw an exception.

System.String GetFullAssemblyName(System.String)
at Microsoft.ClearScript.Util.AssemblyHelpers.GetFullAssemblyName(String name) at Microsoft.ClearScript.HostTypeCollection.AddAssembly(String assemblyName) at System.Array.ForEach[T](T[] array, Action`1 action) at MyEngine.InitScriptEngin() in MyEngine.cs:line 80

It maybe something about "access right" or can't find the system dll problem, but i don't know how to fix it, please help.

best&regards

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images