Skip to main content
Home Forums Silverlight Programming WCF RIA Services RiaContext.Current.Authentication.LoadUser Intermittent Error
1 replies. Latest Post by TerryL on November 8, 2009.
(0)
TerryL
Member
29 points
29 Posts
11-08-2009 1:10 AM |
I am developing a Silverlight application with a login using RIA Services using VS2008. It works 100% on my main dev machine.
When I copy the solution to my laptop (except the web.config file) and run it in VS2008, it works once in a while (maybe 1 time in 20). The rest of the time I get a NotSupportedException, "The URI prefix is not recognized" at the LoadUser call in the MainPage constructor ( I also tried this code in the Loaded event with the same result.)
Here's the code:
public MainPage() { InitializeComponent(); this.loginContainer.Child = new LoginControl(); RiaContext.Current.Authentication.LoadUser(); // need to change menu with login & logout RiaContext.Current.Authentication.LoggedIn += Authentication_LoggedIn; RiaContext.Current.Authentication.LoggedOut += Authentication_LoggedOut;
As I said, the code works on occasion, but most times it fails. I tried uninstalling and reinstalling RIA services. Any suggestions?
Thanks,
Terry
terryl
11-08-2009 5:33 PM |
Evidently the startup project is not stored in the sln file, so when I copied the solution to another machine, the startup project changed. When I set the web project as the startup, everything started working.