Background Info
Developing with Windows Azure and WCF RIA Services, I have seen a lot of random errors and overall frustrating situations, but this one is really the pinnacle.
I have an application with the following architecture: 2 web roles (MVC3 and ASP.NET with Silverlight RIA) => Business layer => data layer (external services / table storage / SQL Azure). ASP.NET services (profile/roles/sessions) are stored in Table Storage.
Due to recent requirement changes, a mobile site needed to be added. I wanted to share the (server side) ViewModels for both GUI projects. To illustrate:
My problem
I now get the dreaded "Not Found" exception when my project is hosted in the Windows Azure environment. With fiddler I found that it was returning the following exception:
The Entity 'XXModel' in DomainService 'XXService' does not have a key defined. Entity types exposed by DomainService operations must have at least one public property marked with the KeyAttribute.
The strange thing is that this thing runs flawlessly in the local Azure development environment, but not when uploaded into the cloud. I think that this error has something to do with the ViewModels now being in a different assembly than the RIA Services, but why would it work locally and not remotely?
If anyone needs any supplemental information I will be happy to answer your questions.