Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

How to debug a RIA Service Class Library (RIA magic demystified)

0.00/5 (No votes)
28 Mar 2012 1  
How to debug RIA Service Class Library ( RIA magic demystified )

Introduction

A simple tip about how to debug a Silverlight RIA Service Class library. 

Background 

Imagine that you have created a Silverlight RIA Service Class Library and everything works fine, but when you plug the library in a separate solution the service for some reason doesn't  run ( for some reason the RIA Service "magic" that handle the .svc file just respond with a 404 not found ).

How can you know the real problem ? 

Using the code (manually creating .svc) 

Instead of letting RIA handle the .svc, what about if we manually create this file and access through the URL? So how? 

Just create a .SVC file let´s say RIATest.svc, and write this code bellow. 

<%@ ServiceHost Service="FULLYQUALIFIEDNAME" 
                Factory="System.ServiceModel.DomainServices.Hosting.DomainServiceHostFactory"%> 

FULLYQUALIFIEDNAME = the fully qualified name of your domain service (inside Silverlight RIA Service Class library Web project ) 

The Factory is the "magic", so now you are simulating the RIA "magic" and if an error occur you will see at run time on our pleasant yellow page. 

Hope you enjoy. 

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here