5

I'm using : https://github.com/Buildstarted/Javascript.ViewEngines as additional Viewengine.

This way i can server side render javascript, react, angular, ... ( it worked before)

For this i need to include a couple of dll in the root directory ( which is weird, but always done it like this)

The files are:

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

  • v8-ia32.dll

  • v8-x64.dll

When running it locally ( on 2 dev computers). Everything runs OK. The problem starts when i publish to either Azure or a "Web Deploy" on my own server.

My own publish gives me this:

Could not load file or assembly 'ClearScriptV8-32' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Azure also: Could not load file or assembly 'ClearScriptV8-64' or one of its dependencies. An attempt was made to load a program with an incorrect format.

NicoJuicy
  • 3,435
  • 4
  • 40
  • 66
  • 1
    delete ClearScriptV8-32.dll and retry. – Ali Mottaghi Pour Jul 15 '17 at 00:51
  • Sounds like your deployment is set up to be 64-bit only, so it can't load the 32-bit library. 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/ – xaxxon Jul 15 '17 at 03:07
  • I hope that after publish ClearScriptV8-32.dll and V8-ia32.dll will be in your bin folder. So please remove from your bin folder and try again. If you still need to use 32bit mode of application then you have enable using 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/ – dotnetstep Jul 15 '17 at 03:09
  • Deleted all the dll's, which i hadn't tried before because Ali Mottaghi Pour suggested it. And it seems to fix it somehow. Convert to an answer and notice that i have delete all x32 and x64 dll's :) – NicoJuicy Jul 15 '17 at 11:12
  • https://stackoverflow.com/a/11371644/7880063 please look into this – Ravikumar Jul 21 '17 at 11:54

1 Answers1

1

Sounds like you need to enable 32-bit applications since that's the type of library it's not able to 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 that link, create a startup file that looks like:

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

Then update your Window Azure Service Definition file to include start up task

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

Make sure that the Startup.cmd file is part of your Web Role application and set its property “Copy Local to True”

xaxxon
  • 19,189
  • 5
  • 50
  • 80
  • I already tried enabling 32bit applications in my IIS pool, but that didn't help. I have both the libraries of x64 and x32 in the folder + bin. Enabling 32bit applications in IIS was the first thing i tried, but it doesn't seem to be the problem somehow. – NicoJuicy Jul 15 '17 at 11:09
  • 1
    You should put that in your question, then, so people don't waste their time – xaxxon Jul 16 '17 at 05:57