📒
OpenRiaServices
  • Start
  • Prerequisites for Open Ria Services
    • Walkthrough: Installing and Configuring SQL Server 2008 R2 Express with Advanced Services
    • Walkthrough: Installing the AdventureWorks OLTP and LT sample databases
  • Creating Open Ria Services Solutions
    • Walkthrough: Taking a Tour of Open Ria Services
    • Walkthrough: Creating a Open Ria Services Solution
    • Walkthrough: Creating a Open Ria Service with the Code First Approach
    • Walkthrough: Using the Silverlight Business Application Template
    • Walkthrough: Creating a Open Ria Services Class Library
    • Walkthrough: Localizing a Business Application
    • How to: Create a Domain Service that uses POCO-defined Entities
    • How to: Add or Remove a Open Ria Services Link
    • Using the Domain Service Wizard
  • Building Secure Applications with Open Ria Services
  • Deploying and Localizing a Open Ria Services Solutions
    • Troubleshooting the Deployment of a Open Ria Services Solution
    • Troubleshooting the Deployment of a Open Ria Services Solution
    • Walkthrough: Localizing a Business Application
  • Middle Tier
    • Domain Services
      • Walkthrough: Adding Query Methods
      • How to: Add Business Logic to the Domain Service
      • How to: Create a Domain Service that uses POCO-defined Entities
      • How to: Use HTTPS with a Domain Service
    • Data
      • Compositional Hierarchies
      • Presentation Models
      • Inheritance in Data Models
      • Complex Types
      • Shared Entities
      • Walkthrough: Sharing Entities between Multiple Domain Services
      • How to: Add Metadata Classes
      • How to: Validate Data
      • Managing Data Concurrency
    • Shared Code
      • How to: Share Code through Source Files
      • Walkthrough: Creating a Open Ria Services Class Library
  • Silverlight Clients
    • Client Code Generation
    • DomainContext and Operations
    • DomainDataSource
    • Error Handling on the Client
    • Customizing Generated Code
      • How to: Add Computed Properties on the Client
  • Accessing non-Silverlight Clients
    • ASP.NET Clients
    • Walkthrough: Using the Domain Service in ASP.NET Applications
  • Authentication, Roles, and Profiles
    • How to: Enable Authentication in Open Ria Services
    • How to: Enable Roles in Open Ria Services
    • How to: Enable Profiles in Open Ria Services
    • How to: Create a Custom Authorization Attribute
    • Walkthrough: Using Authentication Service with Silverlight Business Application
    • Walkthrough: Using Authentication Service with Silverlight Navigation Application
  • End-to-EndScenarios
    • Walkthrough: Retrieving and Displaying Data From a Domain Service
    • Walkthrough: Editing Data From a Domain Service
    • Walkthrough: Displaying Data in a Silverlight Business Application
    • Walkthrough: Displaying Related Data in a Silverlight Business Application
Powered by GitBook
On this page
  • Exception Flow
  • Enable Detailed ASP.NET Error Information
  • Use Fiddler to Inspect Errors
  • Browse to the Domain Service Directly
  • Override the Domain Service OnError Method
  • Use Traditional WCF Tracing Techniques
  • Check ASP.NET and IIS Settings

Was this helpful?

  1. Deploying and Localizing a Open Ria Services Solutions

Troubleshooting the Deployment of a Open Ria Services Solution

PreviousDeploying and Localizing a Open Ria Services SolutionsNextMiddle Tier

Last updated 3 years ago

Was this helpful?

[ This document was written for WCF Services Version 1 Service Pack 2 and might not be up to date Please see or for a list of changes since WCF RIA Services ]

Troubleshooting a Open Ria Services solution presents a unique challenge because an exception can occur at one of many different layers. You need to understand how these different layers report errors to effectively troubleshoot your application. This topic introduces these layers and provides some techniques for troubleshooting your Open Ria Services applications when an exception occurs. Also, many of the issues you may encounter in deploying a Open Ria Services have been anticipated in the new deployment guide, for details see .

Exception Flow

In a Open Ria Services application, exceptions flow in the following order from the lowest originating layer to the client:

  1. Domain Service

  2. Open Ria Services Service Host

  3. WCF

  4. ASP.NET

  5. IIS

  6. Silverlight Application

Enable Detailed ASP.NET Error Information

By default, the customErrors element of a Web.config file is set to RemoteOnly, which means a remote client will not receive the detailed ASP.NET error information. To debug your application, set customErrors to Off so that you can see the detailed ASP.NET error from the client.

Note: Do not make your application publicly available with customErrors set to Off as the error message may expose sensitive information to users.

Use Fiddler to Inspect Errors

Browse to the Domain Service Directly

Directly browsing to the .svc file for your domain service is often a helpful step to see whether the WCF service is available. However, determining the path to the .svc file is not simple because the .svc does not exist in your solution. You can browse directly to the domain service in a Web browser by using the following pattern:

http://[host]/[modified class name for domain service].svc

You determine the modified class name by using the fully qualified class name and substituting a dash (-) for every period (.). So a domain service that is named:

ExampleApplication.Web.CustomerDomainService

has a .svc file named:

ExampleApplication-Web-CustomerDomainService.svc

If this file is hosted on localhost, you browse directly to the file by navigating to:

If the service is available, you will see a Web page with information about services and how to test a service. If the service is not available, you will see an error page that may have information which will help you determine the problem. If you receive an error, the exception probably originated at the Open Ria Services Service Host layer.

Override the Domain Service OnError Method

Use Traditional WCF Tracing Techniques

Check ASP.NET and IIS Settings

For exceptions thrown at the ASP.NET and IIS layers, information from your Open Ria Services application is not included in the stack. You may see exceptions at this level for situations such as:

  • The Web.config file does not have the correct HttpModule element for the version of IIS you are using.

  • WCF is not activated on your Web server.

All exceptions originating from within a domain service are sent to the Silverlight client with an error status code of 200. All exceptions thrown at the WCF layer or lower are sent to the Silverlight client with a status code of 404. You can run the HTTP debugger to see the actual error.

When an unrecoverable error occurs during the processing of a operation, the method is called. You can override this method to inspect errors before they are sent to client.

You troubleshoot exceptions at the WCF layer just like you would troubleshoot any WCF service. For more information about diagnostic tracing for WCF services, see .

An exception that originates at the WCF layer will not show up in . You can troubleshoot a service exception by attempting to browse to the .svc file. If you can browse to the .svc file without an error, but the service fails at run time, then the exception may originate at the WCF layer.

Fiddler
http://localhost/ExampleApplication-Web-CustomerDomainService.svc
DomainService
OnError
Tracing
Fiddler
Release Notes
Changelog
A Guide to Deploying Open Ria Services Solutions
Exceptions flow from layers