- I started with a Silverlight business application template
- I will call it MyApp and MyApp.Web
- I added a new SL application project.
- and added a ria link to an existing web project.
This new SL application is the entry point of my solution and basically loads the main page from another xap file. Checks for updates, etc.
- I deleted the App.xaml and App.xs files from MyApp
- Because Loader is now an Application
- I copied the corresponding code from MyApp - App.cs to Loader - App.cs
- I added the appropriate code from MyApp - App.xaml to Loader - App.xaml
- This is mainly WebContext material.
The problem is that the generated RIA Services code for Loader does not match the code for MyApp
The generated code for MyApp contains the following namespaces:
- Myapp
- Myapp.web
- MyApp.Web.Models
- MyApp.Web.Services
The generated code for Loader contains a namespace:
The next line of code in Loader is App.cs throws InvalidOperationException .
WebContext.Current.Authentication.LoadUser(this.Application_UserLoaded, null);
Error for exception:
DomainContextType is null or invalid and there are no contexts generated from AuthenticationBase<T>
source
share