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.)

Technorati Tags: ,,,

Advertisements

One thought on “WebContext and how to make sure client code gets it

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s