Asp.Net MVC with Javascript View Rendering for Server Rendering - BuildError on Server

I use: https://github.com/Buildstarted/Javascript.ViewEngines as an additional Viewengine.

That way I can handle server side javascript, react, angular, ... (it worked before that)

To do this, I need to include a couple of dlls in the root directory (which is strange, but always do it this way)

Files:

  • ClearScriptV8-32.dll
  • ClearScriptV8-64.dll

  • v8-ia32.dll

  • v8-x64.dll

When launched locally (on 2 computers). Everything is working fine. The problem starts when I publish either Azure or "Web Deploy" on my own server.

My own post gives me the following:

Failed to load file or assembly "ClearScriptV8-32" or one of its dependencies. An attempt was made to download a program with the wrong format.

Azure also: Failed to load file or assembly "ClearScriptV8-64" or one of its dependencies. An attempt was made to download a program with the wrong format.

+4
source share
1 answer

It looks like you need to enable 32-bit applications, because the type of library that it cannot load.

https://blogs.msdn.microsoft.com/avkashchauhan/2011/07/14/windows-azure-web-role-how-to-enable-32bit-application-mode-in-iis-application-pool-using- startup-task /

From this link, create a startup file that looks like this:

%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true

Window Azure,

<Startup>
 <Task commandLine="Startup.cmd" executionContext="Elevated" taskType="simple">
 </Task>
 </Startup>

, Startup.cmd - " True"

+1

Source: https://habr.com/ru/post/1680937/


All Articles