This project has moved. For the latest updates, please go here.

Using V8 engine in WCF IIS Hosting is not working

Apr 25, 2014 at 4:45 AM
Hi ClearScript,

I use ClearScript with V8 in our WCF service and use IIS (Version 7.5) to host the WCF. I have already install VS C++ 2012 redistributable (both x86 and x64), VS C++ 2013 redistributable (both x86 and x64). And put the ClearScriptV8-32.dll, ClearScriptV8-64.dll, v8-ia32.dll, v8-x64.dll to the root folder of the WCF application. However, when I run the service operation, it throw an exception telling that Cannot load V8 interface assembly.

Could you figure out what I did wrong?
Coordinator
Apr 26, 2014 at 12:44 AM
Greetings!

First of all, sorry about the less-than-helpful error message. In the next release of ClearScript the exception will include detailed information about the directories searched and the errors encountered.

Anyway, it sounds like you have most things set up correctly. Please make sure that those assemblies are marked as "Do not copy" and that your bin directory does not contain copies of them.

The only other problems we've seen in deployments like this were all due to permissions. The assemblies were in the right place but the application pool identity couldn't access them. If you're still seeing the exception, can you try running your application under a less restricted identity?

Good luck!
Apr 28, 2014 at 1:23 AM
Thank you for your reply.

I have confirmed that I did not copy those dlls to bin directory. I tried to change the application pool identity to "Local service", "Local system", "ApplicationPoolIdentity" and also administrator account. The problem is still there.
Coordinator
Apr 28, 2014 at 9:18 PM
Edited Apr 29, 2014 at 3:14 AM
Hi Cheokfan,

We have a pending change that improves error reporting for V8 deployment issues. Our plan was to bundle it with the next point release, but that's taking a while, so we'll post it on its own within the next day or so.

This change will allow you to see the specific errors encountered during the V8 loading procedure, and should give you a pretty good idea about what's going on in your deployment.

Cheers!

Update: The error reporting enhancement is now available. Please give it a try when you get a chance.
Apr 30, 2014 at 10:40 AM
Hi, ClearScript,

Finally, I figure out the problem! Those dlls are located in the root folder and I installed a correct VC++ redistributable. The problem is the ClearScriptV8-64.dll. I used "DEBUG" mode to compile it. It need some "debug dlls" of visual studio to make it run. In my deployment server, I didn't install the vs so that it cannot load this ClearScriptV8-64.dll module and make this error.
Coordinator
Apr 30, 2014 at 1:45 PM
Ah, you're absolutely right! Debug versions of the Visual Studio C++ libraries are not redistributable but can be deployed on test machines. Please see here: Preparing a Test Machine To Run a Debug Executable.