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.