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

  • Home
  • SEARCH
  • 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 7766483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:25:48+00:00 2026-06-01T15:25:48+00:00

Say that I got a WCF client that communicates with a WCF service in

  • 0

Say that I got a WCF client that communicates with a WCF service in IIS7(TCP) using channelfactory. If the communication is broken(or the service recycles) then the next call from the client will result in an exception.

At this point I need to hide the exception and instead try to make a reconnect/re-login.

The question is if there is any simple way to do this without adding handling code in every ServiceAgentMethod on the client side? Is this for example possible to solve with a MessageInspector?

In my case I got several Agent classes in the client that runs the service methods with a singular IServceInterface created from ChannelFactory. Something like this :

MyServiceAgent.GetService().GetMyObjects

The GetService() will return the IServiceInterface that is created on login by the ChannelFactory.

  • 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-06-01T15:25:50+00:00Added an answer on June 1, 2026 at 3:25 pm

    I wouldn’t try it using a message inspector; when a channel faults, it faults hard (as you’ve seen, you get an exception). It’s used to indicate that the channel is no longer considered valid and that you shouldn’t make calls on it.

    You might think that you could do this at the transport layer, but you’d need coordination of the layers above it (in order to translate what comes in over the wire, which you really shouldn’t have access to) in order to determine whether or not you have a fault.

    Ultimately, you would want to issue retry logic at the level where you make the call to the proxy. Have an abstraction of the client (an interface) which you intercept before/after you make the call to the proxy; if there’s an exception, you can retry the call, creating a new proxy/channel as needed.

    Be careful to put a limit on the number of retries you perform; if you don’t you’ll end up with a poison pill (your code will retry infinitely). At some point, you’ll want to throw the exception.

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

Sidebar

Related Questions

Let's say you've got a WCF service that is accessible via HTTP and HTTPS,
I'm using CodeIgniter and I got a model that fetches let's say all recipes
Let's say that I've got a : #include <utility> using namespace std; typedef pair<int,
Say that I've got a web application that can store Persons in a database.
Say that you've got IList or List as a property. How do you work
Let's say that I've got this xml: <items> <item name=thumb> <downloadStream>test1</downloadStream> <downloadStream>test2</downloadStream> <downloadStream>test3</downloadStream> </item>
I've got a RESTful resource (let's say posts ) that excludes the index action.
Let's say I've got a method that takes some arguments and stores them as
Say I've got an integer, 13941412, that I wish to separate into bytes (the
Let's say I've got a div that has a width of 50% of the

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.