Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 6.x > Installation and deployment > Error when deploying to Azure (Unhandled Exception: System.IO.FileLoadException) View modes: 
User avatar
Member
Member
mpatti-sherwood-group - 7/18/2012 11:15:25 AM
   
Error when deploying to Azure (Unhandled Exception: System.IO.FileLoadException)
I'm evaluating Kentico on Azure, and after a successful build and package, when I upload the package file to Azure, everything goes well until it tries to initialize the CMSApp ---> CMSApp_In_0 instance. At that point, it reports this error:

"Starting role... Unhandled Exception: System.IO.FileLoadException [2012-07-18T16:22:21Z]"

Azure just spins, and won't start the site.

Since this is a fresh build, I'm uncertain why the error is occurring. I'm new to both Kentico and Azure, but have tried to following the instructions at http://devnet.kentico.com/docs/azureguide/index.html as closely as possible.

Any help would be appreciated.

Thanks,
Michael

User avatar
Kentico Support
Kentico Support
kentico_radekm2 - 7/25/2012 7:38:17 AM
   
RE:Error when deploying to Azure (Unhandled Exception: System.IO.FileLoadException)
Hello.

Am I correct that this error message appears in “Windows Azure Management Portal” directly, not on some page of in the KCMS Event log?

Regrettably, it provides no details of what might be wrong – so far, I wasn’t able to reproduce this issue myself. The deployment went fine, according to Azure deployment guide.

I would maybe recommend trying to re-deploy a web application. Maybe it was some glitch in the process you did not notice and second attempt will be successful. Optionally, you can try deploying a site via Publish wizard in Visual Studio, instead of uploading packages. You could also simplify application’s structure and remove Smart search worker role from the project / process.

Best Regards,
Radek Macalik

User avatar
Member
Member
jsyme-allyis - 7/26/2012 3:21:26 AM
   
RE:Error when deploying to Azure (Unhandled Exception: System.IO.FileLoadException)
I am getting the exact same error. It is showing up in the "Windows Azure Management Portal". I did the deployment via Visual Studio. I am also seeing the continual looping. This is the message that shows up in VS:

1:06:37 AM - Initializing...
1:06:37 AM - Instance 0 of role SmartSearchWorker is in an unknown state
1:06:37 AM - Instance 0 of role CMSApp is in an unknown state
1:07:41 AM - Instance 0 of role SmartSearchWorker is creating the virtual machine
1:09:16 AM - Instance 0 of role SmartSearchWorker is starting the virtual machine
1:09:16 AM - Instance 0 of role CMSApp is starting the virtual machine
1:10:51 AM - Instance 0 of role SmartSearchWorker is busy
1:11:55 AM - Instance 0 of role SmartSearchWorker is restarting
1:11:55 AM - Instance 0 of role CMSApp is in an unknown state
1:13:31 AM - Instance 0 of role SmartSearchWorker is cycling
1:13:31 AM - Instance 0 of role CMSApp is busy
1:18:19 AM - Instance 0 of role CMSApp is cycling

During the initial build I was getting errors about a missing SmartSearchWorker.dll and SmartSearchWorker.pdb. I found them and copied them to the appropirate location.

In addition I am getting about a dozen error messages like:

The project 'SmartSearchWorker' is dependent on the following assembly: C:\Kentico\bin\Lucene.Net.dll. This assembly is not in the package. To make sure that the role starts, add this assembly as a reference to the project and set the Copy Local property to true.

When I check the project references everything looks fine. It may be that these error have nothing to do with the inability to deploy, but thought I would include. I have tried to do this deployment several times and even re-ran the web installer to a completely different directory and tried the deployment with the same result.

User avatar
Kentico Support
Kentico Support
kentico_radekm2 - 8/1/2012 5:15:51 AM
   
RE:Error when deploying to Azure (Unhandled Exception: System.IO.FileLoadException)
Hello.

Thank you for you post. This could be related to previous issue, as if packages were not built well, it may cause such an issue on Azure then.

However, this message seems to be a general ASP.NET issue. I would recommend trying the hints in the error messages - "To make sure that the role starts, add this assembly as a reference to the project and set the Copy Local property to true."

Also there is for example this article: http://social.msdn.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/1f7b61ff-f71c-4438-9d85-8419cbeaa220 about a similar issue.

Best Regards,
Radek Macalik

User avatar
Member
Member
jsyme-allyis - 8/1/2012 12:23:24 PM
   
RE:Error when deploying to Azure (Unhandled Exception: System.IO.FileLoadException)
I was actually able to get this to deploy. I deployed from Visual Studio and the setting that seemed to do the trick was setting the build configuration to Debug. All there error about missing files dissappeared too. I haven't been able to determine if there are any performance impact to doing this. Subjectively everything seems fine.

User avatar
Member
Member
mpatti-sherwood-group - 8/1/2012 1:36:07 PM
   
RE:Error when deploying to Azure (Unhandled Exception: System.IO.FileLoadException)
Thanks for the helpful responses! I'm going to try and re-build the project in debug configuration and re-deploy it. I'll let you know how that goes.

jsyme-allyis: did you remove the SmartSearchWorker role from the project before you deployed? Azure is reporting that the role and instance are ready, so I don't think that's an issue; but wanted to rule it out as a possible source of the problem.

User avatar
Member
Member
jsyme-allyis - 8/1/2012 2:17:58 PM
   
RE:Error when deploying to Azure (Unhandled Exception: System.IO.FileLoadException)
I left SmartSearch in the project. I actually wasn't able to get either role to deploy prior to switching to debug.