Quantcast
Are you the publisher? Claim or contact us about this channel


Embed this content in your HTML

Search

Report adult content:

click to rate:

Account: (login)

More Channels


Showcase


Channel Catalog



Channel Description:

ClearScript is a library that makes it easy to add scripting to your .NET applications. It currently supports JavaScript (via V8 and JScript) and VBScript.

older | 1 | .... | 17 | 18 | (Page 19) | 20 | 21 | .... | 115 | newer

    0 0

    OK, just be sure we have all the correct information:
    ‚Äč
    • You're building your project with Visual Studio 2013.
    • You're using ClearScript only via NuGet package; you aren't building it.
    • You've installed 32-bit and 64-bit Visual C++ 2012 Redistributable packages (they're separate downloads).
    • You're deploying your project only to your local development machine.
    • Deploying to IIS Express works, but deploying to local IIS fails.
    Is all that correct?

    By the way, would it be possible for you to share your project on another site? We can't download from the link you provided above.

    0 0

    • You're building your project with Visual Studio 2013. ................ OK, correct!
    • You're using ClearScript only via NuGet package; you aren't building it. .............. OK, correct!
    • You've installed 32-bit and 64-bit Visual C++ 2012 Redistributable packages (they're separate downloads). ............ Ok, correct!
    • You're deploying your project only to your local development machine................... Ok, correct. And I also posted on another server (full trust), to see if the problem was unique to my machine, but the same error occurs in server online.
    • Deploying to IIS Express works, but deploying to local IIS fails. ................... Ok, correct!
    Following the project for download. It's pretty basic just one page, I created for testing.

    https://clearscriptdany.codeplex.com/SourceControl/latest

    Or

    http://www.studioz4.com/teste.zip

    Any problems let me know.

    0 0

    Thanks for sharing your project! We're investigating, and we've reproduced the correct behavior in IIS Express, but so far we're having trouble deploying to IIS. Hopefully we'll have some more info soon.

    0 0
  • 01/20/14--08:13: New Post: vbs error
  • 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);

    0 0
  • 01/20/14--09:19: New Post: vbs error
  • 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!

    0 0
  • 01/20/14--09:38: New Post: vbs error
  • the error Statement completion expected comes again

    0 0
  • 01/20/14--10:49: New Post: vbs error
  • Hmm, we still can't reproduce that. Where is the script coming from, and how are you loading it?

    0 0
  • 01/20/14--10:58: New Post: vbs error
  • it comes from a file, i load with file,readalllines

    0 0
  • 01/20/14--11:24: New Post: vbs error
  • 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.

    0 0
  • 01/20/14--11:28: New Post: vbs error
  • 0 0
  • 01/20/14--11:47: New Post: Permissions
  • 0 0
  • 01/20/14--11:54: New Post: vbs error
  • Thanks for posting your code. Where is it failing? A stack trace might help. What script is it executing when it fails?

    0 0
  • 01/20/14--12:03: New Post: vbs error
  • that errors is here: Engine.Execute("Dim System = clr.System");

    0 0
  • 01/20/14--12:14: New Post: vbs error
  • That syntax is invalid in VBScript. Please see here and here.

    0 0
  • 01/20/14--12:17: New Post: vbs error
  • oh thanks it works

    0 0
  • 01/20/14--12:18: New Post: datatypes
  • hi,
    what datatypes are implement in clearscript?

    0 0
  • 01/20/14--12:50: New Post: Permissions
  • 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!

    0 0
  • 01/20/14--13:13: New Post: Permissions
  • 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

    0 0
  • 01/20/14--13:54: New Post: datatypes
  • 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!

    0 0

    I have code that executes fine on my machine with Visual Studio installed but have passed the code (compiled) including ClearScript.DLL to someone else who is getting an error when the script runs. I have tracked it down that if I remove the EnableDebugging I do not see the crash. But I need this option to get Column and Line numbers for errors in user scripts.

    Is this crash caused by a lack of VS on the other machine? If so how do I work around this? I ONLY have the debug option enabled for line and column numbers (running v5.3.9 - not yet tried v5.3.11 as I cannot reproduce so need my colleague to run with latest DLL!)

    Stack Trace Info below
    at System.Activator.CreateInstance(Type type, Boolean nonPublic)
    at Microsoft.ClearScript.Windows.ProcessDebugManagerWrapper32..ctor()
    at Microsoft.ClearScript.Windows.ProcessDebugManagerWrapper.Create()
    at Microsoft.ClearScript.Windows.WindowsScriptEngine.<>c__DisplayClass2.<.ctor>b__0()
    at Microsoft.ClearScript.ScriptEngine.ScriptInvoke[T](Func`1 func)
    at Microsoft.ClearScript.Windows.WindowsScriptEngine..ctor(String progID, String name, WindowsScriptEngineFlags flags)
    at Microsoft.ClearScript.Windows.VBScriptEngine..ctor(String progID, String name, WindowsScriptEngineFlags flags)
    at Microsoft.ClearScript.Windows.VBScriptEngine..ctor(String name, WindowsScriptEngineFlags flags)
    MY ENTRY POINT -> at Configurator.ScriptProcessor.EnableAPI(API api)



older | 1 | .... | 17 | 18 | (Page 19) | 20 | 21 | .... | 115 | newer