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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:51:29+00:00 2026-05-16T15:51:29+00:00

I have a wcf service hosted in iis. The endpoint uses wsHttpBinding. I have

  • 0

I have a wcf service hosted in iis. The endpoint uses wsHttpBinding.

I have a lot of clients that are using the service.
The internet connection is unstable.
The clients uses the service to insert data in db.

What is the best practice of exception handling in the client.
Is it good choise to use the using statemen and initialize new connection every time the client needs to insert data (call the service) or should keep opened reference and reinitialize every time it detects no connection ?

I do not like when the client calls the service to show an error to the user telling to retry again. Can it retry automatically?

Regards

  • 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-16T15:51:30+00:00Added an answer on May 16, 2026 at 3:51 pm

    First don’t use using when dealing with WCF proxy or channel. Use this approach to close proxy or channel. Usage of proxy is dependent on your application, your requirements and your current configuration.

    WsHttpBinding by default uses message security with Windows authentication and with establishing security context. This means that at the beginning of communication user is authenticated and security context is created. Security context is similar to security session so the user doesn’t have to be authenticated in subsequent calls from the same proxy. Usage of security context is only valuable if you plan to use proxy for several calls otherwise it is overhead. But creating security context also has side effect – single service instance handles all calls from that proxy. Life time of the service is controlled by several timeouts. Most important is receive timeout with default value 10 minutes. If no request from the proxy arrives within 10 minutes instance is released and channel is closed but proxy doesn’t know about it. Next time you will use the proxy it will fire exception. Channel is also closed by any undhandled exception during request processing on service. So if you want to reuse proxy you have to deal with additional complexity of checking channel state and recreating proxy if something goes wrong.

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

Sidebar

Related Questions

I have a WCF Service Using MSMQ hosted on IIS. I want to create
I have an wcf service that is hosted in II6. The service uses the
I have a WCF service that needs to hosted using basicHttpBinding using SSL. So
Have a WCF service (hosted in IIS 6.0) that takes an XML feed from
I have a WCF service hosted on IIS and it accepts connection like this
I have a WCF service hosted in IIS. The intention is for clients to
I have an IIS 7 hosted WCF service that is mainly being used to
I am using WCF service, which have two endpoint WsHttpBinding and NetTcpBinding and the
I have a WCF web service using basicHttpBinding with NTLM hosted on IIS 7
I have a WCF service hosted in IIS and want to gain access to

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.