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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:03:49+00:00 2026-05-26T16:03:49+00:00

Are services are working, but when the Database goes down, the application pool ends

  • 0

Are services are working, but when the Database goes down, the application pool ends up stopping.

On the service side, we have try/catch with Fault Execeptions for all code connecting to the databases.

I’m looking for an tips on how to reduce these type of errors from the control of the services, as we do not have control over the servers.

Please let me know if more details are needed, and I’ll update the posting.

Custom Client-Side Provider:

   public class ClientWCFProvider<TT> : IDisposable
    {

            private ChannelFactory<TT> channel;

            public TT WCF { get; set; }

            public ClientWCFProvider(string service)
            {
                channel = GetServiceChannel(service);
                WCF = channel.CreateChannel();
            }

            private ChannelFactory<TT> GetServiceChannel(string service)
            {
                 BasicHttpBinding serviceBinding = new BasicHttpBinding();
                //set the config on the bindings for timeouts etc.
                serviceBinding.MaxReceivedMessageSize = 105190152; 
                serviceBinding.MaxBufferSize = Convert.ToInt32(serviceBinding.MaxReceivedMessageSize);
                serviceBinding.OpenTimeout = new TimeSpan(0, 3, 0);
                serviceBinding.SendTimeout = new TimeSpan(0, 3, 0);


                EnvironmentDescriptor serviceEnvironment;
                EndpointAddress ServiceEndpoint;

                ... code to setup the endpoint


                ServiceChannel = new ChannelFactory<TT>(serviceBinding, ServiceEndpoint);

                return ServiceChannel;
    }
    public void Dispose()
        {
            ((IClientChannel)WCF).Close();
            channel.Close();
        }
}

Then the services are called like this:

using(var x = new ClientWCFProvider<TT>("NameOfService"))
{
...
}
  • 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-26T16:03:50+00:00Added an answer on May 26, 2026 at 4:03 pm

    The end solution, based on ErnieL is this: http://blog.davidbarrett.net/archive/2007/11.aspx

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

Sidebar

Related Questions

I have a bunch of self-hosted WCF services. Everything's working fine but I'm look
I have a web service that is working fine in one environment but not
I am working on an application which starts as a service but only if
I have been working on a web services related project for about the last
I'm working on a project where I have 2 web services that need the
I'm working on a web application that renders a reporting services report as a
I'm working on a Silverlight application that works with WCF services. While loading the
I'm working on deploying a web application written in C# with ASP.Net Application services
I'm working on logs for a customer service application. Another guy who is not
I am working on a billing system for service provider and I have 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.