By default, the built-in VS development Web server assigns a random port. This causes problems when developing Data Services because the Silverlight application has no way of knowing that the port used by the Data Services has changed and can no longer connect.
After creating the initial project - and before adding Data Models and Data Services - assign a specific port (e.g., 5000) to the development Web server.
- In Solution Explorer, right click on the Web application name, and from the context menu, click Properties.
- In the Properties pane, click the Web item.
- In the Servers area of the page (around the middle), click Specific Port.
- Set the port to 5000 or another valid value.
- Leave the Virtual Path value as a slash (/).
- Exit and save the changes.