6

I new to ASP.NET development and I have managed to deploy VirtoCommerce to my local machine IIS (windows 8.1) following the documentation on http://docs.virtocommerce.com/display/vc2devguide/Deploy+web+applications+to+dedicated+server .

When I tried to deploy it in Azure VM running Windows server 2012, I got the following error when I tried to run the frontend page. The dll mentioned below is definitely in the /bin folder of the store.

Server Error in '/' Application. Could not load file or assembly 'LibSass.x64' or one of its dependencies. An attempt was made to load a program with an incorrect format.**

I followed the link Could not load file or assembly 'LibSass.x64' or one of its dependencies in VirtoCommerce but found no luck. What did I miss on this deployment ? Any help is much appreciated, thank you.

Community
  • 1
  • 1
alpat
  • 91
  • 3
  • Did you install Windows Management Framework 3.0 on the server properly? After changing anything with this stack you may need to reboot. – Daniel Hoffmann-Mitscherling Jun 13 '15 at 03:12
  • Thanks @DanielHoffmann-Mitscherling I am not sure how to check it properly but this is what I found from powershell, which seems to be the most up to date. Cheers. PSVersion 4.0 WSManStackVersion 3.0 SerializationVersion 1.1.0.1 CLRVersion 4.0.30319.34014 BuildVersion 6.3.9600.17400 PSCompatibleVersions {1.0, 2.0, 3.0, 4.0} PSRemotingProtocolVersion 2.2 – alpat Jun 13 '15 at 06:24

2 Answers2

1

Are you running 64 but machine and IIS Application Pool as 64 bit? If not, make sure to go to IIS and configure pool settings to run as 64 bit process. The easier approach will be to follow the guide here: http://docs.virtocommerce.com/display/vc2devguide/Deploy+from+GitHub+to+Microsoft+Cloud+Azure which will setup Virto Commerce as a website in IIS with all correct configuration for IIS. You can then update it manyally by simply uploading site through FTP if you want. You can also clone the repository on GitHub and that way your azure site will auto update on every checkin.

Woland
  • 2,881
  • 2
  • 20
  • 33
  • Thanks @Woland, I wanted to avoid the Azure deployment setup by vc for my own learning purposes. The VM is a 64 bit machine and I just checked the application pool for the store/admin page and enable32BitAppOnWin64 is set to false. I have been stuck on this for few days might have to resort to deploying from github and FTP in per your advice. – alpat Jun 13 '15 at 06:23
  • how about your dev machine, is it 32bit or 64bit? – Woland Jun 13 '15 at 23:52
  • My dev machine is 64bit. I tried changing the solution and project build configuration to target x86 and also the deploy.cmd, set the enable32BitAppOnWin64 to true for the application pool for the store. The error is now for LibSass.x86, which is in the bin folder of the store. Am I correct to assume there is something missing in my windows server VM ? I am now trying to download the site by FTP from the azure deployment from github and run it in my server VM. – alpat Jun 14 '15 at 01:19
  • You will have to change references to x86 libraries of libsass for that to work. If you want we can definitely troubleshoot it more closely, simply send email to support@virtocommerce.com with details to login to you VM and we'll be able to tell you what is wrong. – Woland Jun 14 '15 at 07:33
  • I managed to find the problem. I was looking at the wrong application pool all this time, now both admin / store page is running on 64bit. For some reason, application pool for admin page was running on 32bit by default. Thanks for all your help ! – alpat Jun 16 '15 at 09:41
  • Not important for admin, since there are no native libraries used. Glad you found the issue. – Woland Jun 16 '15 at 20:26
1

I was able to reproduce this error on a clean Windows Server 2012 Standard. It turned out that Libsass.Net requires Visual C++ Redistributable Packages for Visual Studio 2013. After installing the vcredist_x64.exe the error has gone.

Dartal
  • 432
  • 2
  • 5