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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:20:04+00:00 2026-05-23T09:20:04+00:00

I was thinking how we can find out which server the page was served

  • 0

I was thinking how we can find out which server the page was served from: I’d do so by doing something like put a hidden variable on the page which has the IP or server name from the server it got processed. But what do I do for asp.net ajax requests: those that happen as a partial postback? I’d have to put the hidden variable in the update panel, but what if there are many update panels in the page?

I checked out another SO post, but the solution was for iis 7. What is the equivalent for iis6? And how can we read the header? Where to look?

  • 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-23T09:20:05+00:00Added an answer on May 23, 2026 at 9:20 am

    You can set IIS6 custom headers via IIS MMC by opening a site’s properties then clicking on the HTTP Headers tab:

    enter image description here

    You can also use adsutil (found in c:\InetPub\AdminScripts):

    cscript adsutil set w3svc/1/root/HttpCustomHeaders "X-Served-By:Server-001"
    

    The command above will configure the HTTP Headers for the default website.

    Be careful when using adsutil as this will overwrite any existing headers already configured.

    To set multiple headers do:

    cscript adsutil set w3svc/1/root/HttpCustomHeaders "X-Served-By:Server-001" "X-Powered-By:ASP.NET"
    

    Update:

    With regard to accessing the response headers on the client, if you’re using an ASP.NET AJAX update panel then add this script to the end of your page:

    <script type="text/javascript" language="javascript">
      Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endPageRequest);
    
      function endPageRequest(sender, args) {
    
        var allHeaders = args._response._xmlHttpRequest.getAllResponseHeaders();
        var headers = allHeaders.split('\n');
    
        // At this point you have a string array of response headers.
    
        // Or you can get an individual header:
        var header = args._response._xmlHttpRequest.getResponseHeader("MyHeader");
    
      }
    </script>
    

    This will hook into the page request manager such that when the Ajax request completes you also get visibility of the underlying XMLHttpRequest object which has a copy of the response headers.

    You can do something similar with jQuery:

    $.ajax({
      url: "/Home/HeadTest",
      success: function (data, textStatus, xhr) {
        var header = xhr.getResponseHeader("MyHeader");                 
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can you please give me suggestion as I wanted to find out which is
I need to find out status of an object which can change at any
I'm thinking of something smaller than a laptop that i can spend my hours
How can I convert PDF files to HTML with Python? I was thinking something
I'd like to begin thinking about how I can scale up my algorithms that
I have an asp.net page within which I've used several AJAX controls doing partial
Back in the days :) it was possible to find out which links where
I have a multi module maven project which looks something like: main component_one subcomponent_bob
What I would like to do is find out the userId of the Nth
I've written this class that returns feed updates, but am thinking it can be

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.