Quantcast
Channel: clearscript Discussions Rss Feed
Viewing all 1449 articles
Browse latest View live

New Post: Using ClearScript. WebApplication problem

$
0
0
1) absolutely not!! this morning i've tried to copy my project and use nuget but in that case after the WEB project launch i've obtained the same error in the local machine, and then i used the original settings: use the dll as resource, avoid the xcopy in the project (normally setted by nuget for example) ....

2) after i'have execute my project in my local machine (with iis 7.5 too) i deploy the entire project by the tool "export application" in iis in my amchine to obtain a zip file, and import in the iis 7.5 in the other machine (32bit like mine for now) by the iis tool "import application"; and then, in the project "deployed" (if is correct to say) i saw that the dll library are in the correct position, ClearScript inside the "bin" and the othe dll "ClearScriptV8-32", "ClearScriptV8-64", "v8-ia32", "v8-x64" in the root/home site (main directory)

New Post: vbs error

$
0
0
Namespace conflicts with 'HostType' at 'System.Internal.HandleCollector'
 Engine = new Microsoft.ClearScript.Windows.VBScriptEngine();
             Engine.AddHostObject("host", new HostFunctions());
             var typeCollection = new HostTypeCollection("mscorlib", "System", "System.Core", "System.Windows.Forms"); 
             Engine.AddHostObject("clr", typeCollection);
             Engine.Execute("var System = clr.System;");
             Engine.AddHostObject("require", new Action<string>(s => Engine.Execute(File.ReadAllText(Application.StartupPath + "\\Content\\" + s))));
             Engine.AddHostObject("eval", new Action<string>(s => Engine.Execute(s)));
             Engine.AddHostObject("xHost", new ExtendedHostFunctions());
             Engine.Execute(src);

New Post: vbs error

$
0
0
Yeah, this happens because mscorlib.dll includes a type named "System.Internal", and System.Windows.Forms.dll includes a namespace with the same name, so you can't merge them into the same type collection.

There are two things you can do - (1) use two separate type collections, or (2) use a filter to exclude types you don't need. The conflict here involves only internal types that probably aren't useful. Here's how to include only public types and avoid the conflict:
Predicate<Type> filter = type => type.IsPublic;
var collection = new HostTypeCollection(filter, "mscorlib", "System.Windows.Forms");
Good luck!

New Post: vbs error

$
0
0
the error Statement completion expected comes again

New Post: vbs error

$
0
0
Hmm, we still can't reproduce that. Where is the script coming from, and how are you loading it?

New Post: vbs error

$
0
0
it comes from a file, i load with file,readalllines

New Post: vbs error

$
0
0
OK, that gets you an array of strings; what do you do with them next? It would be great if you could post the code you use to load and execute the script.

New Post: vbs error


New Post: Permissions

New Post: vbs error

$
0
0
Thanks for posting your code. Where is it failing? A stack trace might help. What script is it executing when it fails?

New Post: vbs error

$
0
0
that errors is here: Engine.Execute("Dim System = clr.System");

New Post: vbs error

New Post: vbs error

New Post: datatypes

$
0
0
hi,
what datatypes are implement in clearscript?

New Post: Permissions

$
0
0
Greetings Metalus!

ClearScript does not have Jint-like permission support. It runs scripts in the same security context as the host. However, by default ClearScript does not expose any .NET resources, does not allow scripts to import .NET resources, and blocks scripts from using reflection.

Thanks for your question!

New Post: Permissions

$
0
0
I believe that would be a great question for a future update.
For example: I would like to have the permissions for block some folders in the I/O

New Post: datatypes

$
0
0
Hi furesoft,

Could you please clarify your question? Are you asking about the types of values that scripts can return to the host? The types of objects that hosts can expose to script code? Datatypes that are specific to the CLR or a script language? Built-in conversions? Please give us a better idea of what you're looking for.

Thanks!

New Post: Using ClearScript. WebApplication problem

$
0
0
We're investigating and will have more info (or more questions) soon. Thanks for your help.

New Post: datatypes

$
0
0
i mean what datatypes are implement in the engine?
like string or array

New Post: datatypes

$
0
0
ClearScript does not implement or modify any script engines. It "wraps" the JScript and VBScript engines included with the OS, and the V8 engine provided by Google. When moving data across the host-script boundary, ClearScript generally doesn't perform any data conversion, but there are exceptions. Strings and numbers, for example, are converted to and from their equivalent .NET types.
Viewing all 1449 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>