Tuesday 4 May 2010

WebContext and how to make sure client code gets it

When you create RIA services, you want to make sure the ‘WebContext’ is available for the clients to consume the services. WebContext is created by Visual studio from the web project you are pointing to in WCF RIA link. Here are the couple of things you need to do to make sure you are not going run into ‘WebContext’ not found compilation error.

1. First and foremost, check the client side project property and make sure under ‘Silverlight’ tab, the last option ‘WCF RIA Services link’ is pointing to the correct web service project.

2. Enable ‘Show All Files under Solution explorer and find the ‘Generated_Code’ folder and remove everything from there.

3. Restart VS2010 (some times it works too, at least when I was testing with Beta, on some occasions, restarting VS IDE resolve the problem.)

0 comments:

Post a Comment