none
Problems on Azure with Chilkat libraries

    问题

  • Hello

     

    Maybe somebody used in Azure project Chilkat .NET 4 libraries?

    I'm getting errors: 

    Azure System.BadImageFormatException: Could not load file or assembly....

     

    2011年5月23日 11:10

全部回复

  • I have never used these libraries but this exception usually occurs when you have a platform mismatch. In other words, you are trying to use a 32-bit assembly in a 64-bit environment such as Azure or, if you are running locally and your environment is 32-bit, a 64-bit assembly. You don't mention where you see the error, whether it's the cloud emulator or after deploying to Azure. Either way, if you compile the library code, make sure that the platform matches your target environment.

    2011年5月23日 14:17
  • Hi

     

    Thanks for answer. Problems appearing after deploying to Azure.

    I'm tested chilkat .NET Components for the .NET 4.0 Framework (win32)

    and the Chilkat .NET Components for the 64-bit .NET 4.0 Framework (x64).

    Same problem.

    On my local PC, in emulator it works (32 bit system i have) ok.

    2011年5月24日 5:31
  • I'm new in Azure.

    How i can configure and have 32-bit environment on Azure?

    2011年5月24日 13:18
  • How i can configure and have 32-bit environment on Azure?


    It depends on what you are trying to do. In the Azure environment, the role entry point is always 64-bit.

    In a worker role, you would need to spawn a 32-bit child process from your entry point and then do your work there.

    In a web role running in Full IIS mode, you can configure the application pool defaults to run as 32-bit. This enables the worker process hosting your ASP.NET application to run as 32-bit. To do this, run the following command as a start-up task.

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

    Having said that, if you have both 32-bit and 64-bit versions of the library, it shouldn't be necessary to run your Azure roles as 32-bit. Make sure that you are deploying the correct version of the libraries *as well as its dependencies* to Azure. Make sure that any dependencies that you deploy--for example, if this is unmanaged code, the C runtime--also match the platform of the library.

    If you have access to a 64-bit machine, I would first debug the application in that machine using the cloud emulator to ensure that you have set up everything correctly.


    2011年5月24日 14:04
  • Hi

     

    It is possible on azure deployment have 32 bit system?

    2011年5月25日 12:48
  • If you are asking whether you can have VM in Azure that runs a 32-bit OS, then the answer is no. But you can run 32-bit processes as I explained in my previous reply.
    2011年5月25日 17:04
  • Hi

    I'm downloaded .NET 4 64 bit library included to my reference.

    On Azure deployment getting same error:

    ERROR System.IO.FileNotFoundException: Could not load file or assembly 'ChilkatDotNet4.dll' or one of its dependencies. The specified module could not be found.

    File name: 'ChilkatDotNet4.dll'

    2011年5月26日 5:31
  • Hi

    Finally solved a problem.

    Just needed connect to deploy and install additional software :)

    Thanks for help.

    2011年5月26日 10:15
  • Hi elyga,

    I'm glad to hear that you resolve this issue.

    Thanks,


    Wengchao Zeng
    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    2011年5月27日 1:51
  • Hi

    Finally solved a problem.

    Just needed connect to deploy and install additional software :)

    Thanks for help.


    May we ask what additional software was required to run ChilkatDotNet4.dll in Azure?  Thanks!
    2011年5月28日 19:12
  • Hi elyga,

    You said you have solved the issue by remotely connecting to your deployed service and installing additional software. Please kindly note that installing applications via Remote Desktop is not recommended except for test purpose only. If we manually change the service instance environment after the service is deployed, the change will lose when reimaging/reprovision the VM.

    Please use startup task to install additional software, or use VM Role so that you can preinstall software before uploading the VM image. Please check the following resources for more information about startup task and VM Role.

    Starting Tasks Before Role Instances Start in Windows Azure
    http://msdn.microsoft.com/en-us/library/hh180155.aspx

    Creating Applications by Using a VM Role in Windows Azure
    http://msdn.microsoft.com/en-us/library/gg465398.aspx

    Thanks,


    Wengchao Zeng
    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    2011年6月2日 8:31
  • hi, can you tell us how did you manage to solve the problem getting chilkat to run on azure. I would really appreciate it. thanks.
    2011年11月29日 20:31
  • Hello

    I'm connected with RDP to Azure image and installed vcredist_x64.exe.

    How to configure Azure RDP, you can find here:

    2011年11月30日 6:55