IIS Express is OK . But in Local IIS error: " Can not load assembly V8 interface ... " . Why ?

Jan 16, 2014 at 9:16 AM
Edited Jan 16, 2014 at 10:05 AM
JavaScriptEngineSwitcher.V8 not work on Local IIS

IIS Express 8 ======== > OK
IIS 7.5 (Win 7) ======= > Error

Why?

By way of testing , I created a simple project in Visual .

1 ) Added new " Web Application " Net 4.5
2 ) Added the " BundleTransformer.Less " package
3 ) Added the " JavaScriptEngineSwitcher.V8 " package
4 ) I created a file . " Less" with a red background in Content Folder .
5 ) The Configu BundleTransform to use V8
6 ) And follow the example provided by BundleTranform to add the file " teste.less " for minification
7 ) Build project using IIS Express

And everything is working perfectly!

Now build the project using IIS 7.5 native

Example :
http://localhost/myproject/

And is showing the error mentioned :

" Can not load assembly V8 interface ; VERIFY The Following files that are installed with your application : ClearScriptV8 - 32.dll , 64.dll ClearScriptV8 - v8 - v8 ia32.dll - x64.dll "

Anyone have any idea why? Associated with some setting in IIS ?

The problem is that the same mistake is going to publish the test on the web server . I resolve the problem locally run on IIS Express , but on the official server has no way ! So if you 're missing some setting in IIS 7.5 ... it must also be done on the server .

Follow the download test project to analyze :
http://www.4shared.com/zip/wGIkbg1Fce/BasicTransform.html
Coordinator
Jan 16, 2014 at 12:26 PM
Hello netdany!

If you're deploying to a server that doesn't have Visual Studio installed, it must have the Visual C++ Redistributable libraries installed. Here are the download links:

Visual Studio 2012
Visual Studio 2013

Be sure to install both the 32-bit and 64-bit packages. The Visual Studio 2012 packages are probably the correct ones for the NuGet packages you're using.

Good luck!
Jan 16, 2014 at 2:53 PM
I installed the above file, rebooted the PC and problem persists.

I have already had laying around here installed, Visual Studio 2013.

Remembering that when I access the site with IIS Express is transforming the files correctly.

The error only occurs with the Local IIS and server (smarterasp.net) too.

Any idea, what can this missing?
Coordinator
Jan 16, 2014 at 5:41 PM
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.
Jan 16, 2014 at 7:56 PM
  • 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.
Coordinator
Jan 17, 2014 at 2:49 PM
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.
Jan 18, 2014 at 11:46 AM
Ok, thank you!
Jan 18, 2014 at 2:39 PM
Edited Jan 18, 2014 at 2:44 PM
Mysteriously, it worked in version JavaScriptEngineSwitcher.V8 1.1.0 after I installed " Internet Information Services ( IIS ) 7 Manager ".

http://www.microsoft.com/en-us/download/details.aspx?id=2299

I have no idea , that 's because ...

Already version 1.1.1 is also running, but has an error in some projects :
...
"System.IO.FileLoadException: Could not load file or assembly 'ClearScriptV8-32.dll' or one of its dependencies. Access is denied. "
...

However when I publish the project on an online server , nothing works .

In summary :

1 ) Server Online (Windows Server 2012, Net 4.5 and Full Trust):

Version 1.1.0 : ( ... ) " Can not load assembly V8 interface " (For all)
Version 1.1.1 : ( ... ) " Access is denied " . ( For all attempts . For all sites , even for new)

2 ) Locally , with Local IIS ( 7.5 )

Version 1.1.0 : OK , after " Internet Information Services ( IIS ) 7 Manager "
Version 1.1.1 : OK and " Access is denied " in project " Teste "


Note : " Access is denied " , I tried to clean everything: NET temporary files folder , bin and etc. . . Deleted package, reinstalled . Clean and Rebuild . But nothing worked. Another mystery .
Coordinator
Jan 19, 2014 at 6:25 PM
Hi netdany,

We reproduced your problem on a local IIS server, but we couldn't debug it because the ClearScript binaries supplied with the JavaScriptEngineSwitcher.V8 package are based on modified sources, and we couldn't swap in our own because the package's main assembly is strongly bound to the packaged version of ClearScript.

We were hoping to get the full source for everything, but it looks like the package has already been updated for ClearScript 5.3.11 and is now leveraging its new V8 assembly loading scheme. We recommend that you take up the remaining permissions issue with the package's owner.

Thanks, and good luck!