3

I have a simple asp.net mvc 4 site that uses less files. When i run it on my local pc it works fine, but when i publish it to the server I get te following error:

During the output text content of processed asset an unknown error has occurred.
See more details:
Exception has been thrown by the target of an invocation.

stacktrace:

[HttpException (0x80004005): During the output text content of processed asset an unknown error has occurred.
See more details:
Exception has been thrown by the target of an invocation.]
   BundleTransformer.Core.HttpHandlers.AssetHandlerBase.ProcessRequest(HttpContextBase context) +1895
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +913
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165

For rendering the less files i use the BundleTransformer.Less and in the web.config i added in bundletransformer:

<less useNativeMinification="false" ieCompat="true" strictMath="false" strictUnits="false" dumpLineNumbers="None">
      <jsEngine name="V8JsEngine" />
    </less>
Martijn
  • 45
  • 9

2 Answers2

1

Try to install the Visual C++ Redistributable Packages for Visual Studio 2013 on the server.

Note: older versions of the JavaScriptEngineSwitcher.V8 (before version 1.3.0) required the Visual C++ Redistributable for Visual Studio 2012.

Andrey Taritsyn
  • 1,286
  • 11
  • 26
  • I tried to run locally (local iis / express) with all Redistributable Packages installed 2008-2015, and it didn't worked as expected. I ended up in the same situation. Having the following configuration: – Razvan Dumitru May 20 '16 at 12:09
  • In this case, need is exactly 2013 version, 2015 version will not replace it. – Andrey Taritsyn May 20 '16 at 14:08
  • I tried with the following Redistributable Packages installed http://imgur.com/e8xEZo0, but still wasn't able to get rid of the error – Razvan Dumitru May 20 '16 at 15:34
  • What version of ASP.NET do you use? – Andrey Taritsyn May 20 '16 at 15:43
  • 4.5.2. but it looks that it is machine related, not project related. 90% of people working on this project doesn't have any problem. We tried to switch to MSIE and everything is good for all 100%. – Razvan Dumitru May 24 '16 at 08:04
  • It is possible, that the problem is caused by incorrectly installing of the Visual C++ Redistributable Packages on your computer. I recommend you also try the [JavaScriptEngineSwitcher.ChakraCore](https://www.nuget.org/packages/JavaScriptEngineSwitcher.ChakraCore/). – Andrey Taritsyn May 24 '16 at 10:45
  • I tested with the ChakraCore engine and received the same error: During the output text content of processed asset an unknown error has occurred. So it really is an error with my machine and other machines, but a strange one. We will probably stick with MSIE for now as it only requires >=IE9. – Razvan Dumitru May 24 '16 at 11:07
  • Now it is clear, that the problem in incorrect installation of the Visual C++ Redistributable Packages. – Andrey Taritsyn May 24 '16 at 11:22
  • Yep. Maybe i'll try to repair all packages and give an update about this when i'll have time or if i will face again problems in this area on my machine. – Razvan Dumitru May 24 '16 at 11:33
0

Some versions of JavaScriptEngineSwitcher / BundleTransformer packages may not work well on IIS 8.5 web servers (I don't know exactly what cause an error, it might be some dependencies, e.g. ClearScript dlls)

I have similar issues today after attempt to upgrade to last versions on NuGet and after fights decide to revert back to usage of the following versions (tested and works well on IIS 7 / IIS 8.5):

  <package id="BundleTransformer.Core" version="1.9.25" targetFramework="net45" />
  <package id="BundleTransformer.Less" version="1.9.25" targetFramework="net45" />
  <package id="JavaScriptEngineSwitcher.Core" version="1.2.4" targetFramework="net45" />
  <package id="JavaScriptEngineSwitcher.V8" version="1.2.0" targetFramework="net45" />

You can use NuGet console to install specific version of given packages (see How to install an older version of package via NuGet?)

Community
  • 1
  • 1
Evereq
  • 1,662
  • 1
  • 18
  • 23
  • Have you tried to install the [Visual C++ Redistributable Packages for Visual Studio 2013](http://www.microsoft.com/en-us/download/details.aspx?id=40784)? Quote from [сhange log](https://github.com/Taritsyn/JavaScriptEngineSwitcher/blob/master/CHANGELOG.md) for JavaScriptEngineSwitcher.V8 v1.3.0: “... and now requires assemblies msvcp120.dll and msvcr120.dll from the Visual C++ Redistributable Packages for Visual Studio 2013”. – Andrey Taritsyn May 20 '16 at 14:02