Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4117714
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:52:08+00:00 2026-05-20T22:52:08+00:00

I have a set of WCF services which I have been using with an

  • 0

I have a set of WCF services which I have been using with an ASP.NET MVC application so far. These service operations return a FaultException when the server has identified problem with what the client has submitted. For example:

if(string.IsNullOrEmpty(request.Name))
     throw new FaultException<ValidationDictionary>(new ValidationDictionary());

This works great in my ASP.NET Application

catch(FaultException<ValidationDictionary> fault)
{
  //  Happy error handling.
}

However with Silverlight this all fails. The server returns a 500 status code with the faultexception (as expected) but to Silverlight this just looks like a duff response.

The following MS article indicates a (ugly) work around for this: http://msdn.microsoft.com/en-us/library/ee844556%28v=vs.95%29.aspx
This workaround makes the service transmit 200 status codes, even if there is a FaultException, so that the Silverlight client can get them. But this will mess up ‘normal’ clients of my service (my ASP.NET application, other users in the wild).

However, the point of services is to have seperation from your clients. I still want my services to return 500 status codes so that my ASP.NET application can detect the FaultExceptions and handle them. But I also want Silverlight to be able to handle them too.

Has anyone come up against this before?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:52:09+00:00Added an answer on May 20, 2026 at 10:52 pm

    We’re using the ugly 500 to 200 converter endpoint behavior (one of the options in the link you provided), it does work for pretty nicely in Silverlight. A quick windows form client appears to also understand that while the response codes are 200 (ok) I’m still seeing e.Error populated correctly.
    Is there really any technical issues with 200 vs. 500 with the clients you’re using (ASP.NET)? If not, what’s the problem?

    I’ve also used the alternate HTTP stack in Silverlight (the other options in that MSDN article) until recently. Using that fixed a lot of things (including the error returning if I recall correctly). We were using it since it provided consistent NTLM/Negotiate authentication regardless of the browser. I had to stop using it since it was decided that the lack of HTTP compression was a deal breaker. This would keep the service unchanged (500s on errors).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of existing WCF services hosted in a .NET 3.0 app.
I have been having some issues retrieving JSON data from a WCF service application
We have a set of (ASMX but could be WCF) 64-bit web services which
I have a Silverlight application that communications with an ASP.NET backend through WCF. I
I have set validation attributes in the model of my WCF service [MinLength(6, ErrorMessage
I have a self-hosted WCF service with the InstanceContextMode set to PerSession. How can
I'm doing unit testing for our WCF RIA services, which have RequiresRole or RequiresAuthentication
I have been technically testing a WCF service recently and have got to the
In my WCF web service I have been reading from the database with no
I have set up some WCF services that I use to call from javascript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.