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 518177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:54:37+00:00 2026-05-13T07:54:37+00:00

I have a task running on a remote system connecting back to a server

  • 0

I have a task running on a remote system connecting back to a server using WCF. It is very possible that the task can throw exceptions, and I’d like those exceptions to be channeled back to the server. Essentially I want to do something like this:

Client:

server.SendException(new UnauthorizedAccessException("Some Exception"));

Server:

public void SendException(Exception e)
{
    throw e;
}

Contract:

[ServiceContract]
public interface IServerContract
{
    [OperationContract]
    void SendException(Exception e);
}

I’ve been reading a little bit about fault exceptions, but from what I understand, they are used for specific exceptions that are running in a method called over WCF. What I want is to send any type of exception that the application has thrown outside of WCF context, and then channel them back to the server for further processing. If it helps in a solution, the server also has a connection back to the client.

  • 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-13T07:54:38+00:00Added an answer on May 13, 2026 at 7:54 am

    You need to catch the exceptions on the server and package them up into SOAP faults to send them back over the wire. Otherwise, your client-server channel will be “faulted” and unusable.

    A SOAP fault is basically the interoperable SOAP equivalent of a .NET exception. You are not supposed to throw .NET exceptions because of the very fact they are .NET specific – WCF and SOA is by definition system-agnostic.

    If both ends of the communication wire are indeed guaranteed to be .NET, you can easily wrap up any .NET exception into a FaultException<T> and thus easily channel back .NET specific exception information using a SOAP compliant “transport vehicle”.

    Read up more on SOAP faults and how to turn your .NET exceptions on the server into SOAP faults on the wire here:

    • Specifying and Handling Faults in Contracts and Services
    • WCF Error Handling and Fault Conversion
    • WCF error handling and some best practices
    • Exception Handling in WCF using Fault Contract
    • Using the Fault Contracts (SOAP Faults) in WCF Programming
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a scheduled task running on a Windows Server 2008 R2 that is
I have a task killer program that has a listbox of current running processes.
I have an Activity with a button that starts a long running task. I
I have task involving reading SAS .xpt files using .NET. For that I'm using
I have some task regarding do operations on database using ADODB in Vb.NET. Can
I have a task running using javax.swing.Timer. It executes once every few minutes. The
I have a custom MSBuild task for xUnit.net. When the task is running, if
I'm using dhtmlx Gantt Chart UI component which have task list and graphical chart.
I have a task to do, I need to take data that has been
i have a scheduled task running for every 30 mins in ubuntu. i'm writing

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.