Question

I've a LoB Silverlight 5 app running on Windows Azure. I developed that app with EF4 and RIA Services. I decided to update the model to EF5 with the latest RIA Services keeping it on .NET 4.

Short story:
after I've updated to EF5 and RIA Services 4.2, the app works locally in the emulator but it crashes on Azure.

Long Story:
App is divided in 4 projects: client, server (contains DbContext), model (contains edmx file), helpers.

When I decided to update, I started with the model project: deleted old references, deleted edmx, added new references (nuget), generated new edmx. It build correctly.

Then the server project: deleted old references, added new references (nuget), changed Domain Service files with DbContext and edited so it works with EF5. It build and the app worked locally (no azure emulator).

When I tested on the Azure emulator the response was a 501. I found somewhere (I post the link when I'll find it again) the solution is to add an app.config file containing the same runtime/assemblyBinding/dependentAssembly/assemblyIdentity section is in the web.config file that references Entity Framework.

Then I uploaded on a staging environment on Azure and the process WaBootstrapper keep cycling trying to install the server code while WaIISHost keep crashing.

Things I tried:

  • change name to app.config to the server assembly dll eg: AppName.Web.dll.config
  • delete System.Data.Entity (do not build at all.. that dll is needed);
  • migrate to .NET 4.5 to get rid of System.Data.Entity;
  • checking all references in every project and "Copy local" option;
  • migrate to Entity Framework 6 (RC1).. just trying.. I can't be blamed for it;
  • (other stuff I don't remember).

None of the list above have changed the results. I spent more that a week on this and now I think I lost focus.. so I'm asking for your help. You, guys, have saved me more than one time. I can't even try to remember how was before internet and StackOverflow.

Thanks.. any help is welcome!

P.S. Edited by the author I forgot to mention I also updated Windows Azure SDK from 1.7 to 2.1.

Était-ce utile?

La solution 2

Installed Visual Studio 2013, opened project, I was asked if I want to update to Windows Azure SDK 2.2: YES. Build. Published. Works.

I really don't know what happend. Anyway my project went beyond that point so I have to migrate to EF 5 and new Ria Services again. If I found out something else I'll edit this answer.

Autres conseils

If you are using spatial data types, they are defined Microsoft.SqlServer.Types. I've read a tweet (from whom I can't remember - sorry) that they had to switch to "copy local" for this type as the Azure image does not contain this file.

I did found this article on code project that highlights this issue in the Background section. Using Spatial Data with SQL Server 2012, Entity Framework 5 and ASP.NET MVC

HTH, Richard

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top