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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:26:29+00:00 2026-05-15T11:26:29+00:00

Our Situation: We have several webservers behind a loabalancer (Astaro Security Gateway). On the

  • 0

Our Situation:

We have several webservers behind a loabalancer (Astaro Security Gateway). On the webservers we run an asp.net application and we have customerrorpages configured for 404 and 500 status codes.

Now when the Application fails to start every request is redirected to the errorpage by sending status code 302 and the errorpage itself then sends a 500.

The loadbalancer sends a HEAD request to our webservers every 15 seconds to see if its still alive and if so it checks the first html status code. So it only sees the 302. Every code below 500 is treated as server is up and running.

Question:

How can we make our loadbalancing work if the application failed to start?

Edit:

By Application failed to start I mean that during the startup there were errors. Some essential parts could not be initialilzed and therefore every page fails to execute.

  • 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-15T11:26:31+00:00Added an answer on May 15, 2026 at 11:26 am

    A couple of ways:

    In your web.config on the customErrors mode set the redirectMode to ResponseRewrite – this removes the 302 redirect from the server to the error page – this also has the happy coincidence that uses can easily see what the original page they requested was, and can retry with an F5 if that’s likely to resolve the issue.

    If you are hooking into the ApplicationError event, make sure that rather than redirecting to your error pages you use Server.Transfer instead.

    I have the following in one of my web.configs:

    <customErrors mode="On"
                  defaultRedirect="ErrorHandler.aspx"
                  redirectMode="ResponseRewrite">
    

    Then in my ErrorHandler page I check for the last error from the server, and configure those:

      var serverError = Server.GetLastError();
    
      var error = serverError as HttpException;
    
      int errorCode;
      string errorMessage;
    
      if (null != error)
      {
        errorCode = error.GetHttpCode();
    
        errorMessage = error.GetHtmlErrorMessage();
      }
      else
      {
        errorCode = 404;
        errorMessage = "Page not found";
      }
    
      Response.StatusCode = errorCode;
      Response.StatusDescription = errorMessage;
    

    Obviously you may want to do additional processing – for example before I do all this I’m comparing the original request with my Redirects database to check for moved content/vanity urls, and only falling back to this if I couldn’t find a suitable redirect.

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

Sidebar

Related Questions

We have a situation where our application calls some stored procedures on a sql
We have a situation in our product where for a long time some data
Currently in our enterprise we have a situation that i think it's not very
We have a bit of a messy database situation. Our main back-office system is
My situation: I have several components, which sometimes have changes to them, and are
Our business deals with houses and over the years we have created several business
Our situation is as follows, but I'm curious about this problem in any situation.
Which is better to do client side or server side validation? In our situation
The situation: I need to convert our current development environment from Windows XP 32-bit to
We've got a situation where someone messed up a Commit to our SVN server.

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.