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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:44:28+00:00 2026-05-10T16:44:28+00:00

I have an ASPX page (On server A) which is invoked using NTLM credentials.

  • 0

I have an ASPX page (On server A) which is invoked using NTLM credentials. Part of that page’s job is to call an HTML page (On server B) and proxy it back to the client. (The firewall allows access to A, but not to B. The user would normally be allowed access to both servers.). Server B is also not open to anonymous access, so I need to supply credentials to it.

If I hardcode some credentials (as per the attached code), it works, but ideally I would echo the credentials that were received by the .aspx page. Is there some way to get those NetworkCredentials so I can pass them on?

protected void Page_Load(object sender, EventArgs e) {      Response.Clear();      WebClient proxyFile = new WebClient();      CredentialCache cc = new CredentialCache();      cc.Add(new Uri('http://serverB/'), 'NTLM',          new NetworkCredential('userName', 'password', 'domain'));      proxyFile.Credentials = cc;       Stream proxyStream = proxyFile.OpenRead('http://serverB/Content/webPage.html');      int i;      do {          i = proxyStream.ReadByte();          if (i != -1) {              Response.OutputStream.WriteByte((byte)i);          }      } while (i != -1);      Response.End();  }  
  • 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. 2026-05-10T16:44:29+00:00Added an answer on May 10, 2026 at 4:44 pm

    You can certainly obtain the login name of the caller, but not the password. NTLM uses a challenge/response mechanism, so the password is never transmitted. Your server must have access to a password-equivalent (a hash) in order to form the challenge and check the response, but even if you can get hold of it that password-equivalent will be no use to you in trying to form credentials that will be accepted by server B.

    If you can set up impersonation, as described in another answer, even that doesn’t necessarily get you what you want. By default, an impersonating server process is not allowed to transmit its identity to another server. That second hop is known as delegation and needs to be configured explicitly on the servers involved (and/or in Active Directory).

    Apart from delegation I think your only option is to maintain a database of credentials that server A can access and present to server B. Building that in a secure manner is a subtle and time-consuming process. On the other hand, there is a reason why delegation is disabled by default. When I log into a server, do I want it to be allowed to use my identity for accessing other servers? Delegation is the simplest option for you, but you’ll need to be sure that server A can’t be compromised to do irresponsible things with your users’ identities.

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

Sidebar

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Colorjack is a color scheme generator. Is useful if you… May 11, 2026 at 10:01 am
  • added an answer There's a few ways depending on the complexity of the… May 11, 2026 at 10:01 am
  • added an answer I found another strategy poking around http://github.com/wycats/thor/tree. Thor lets you… May 11, 2026 at 10:00 am

Related Questions

I have an ASPX page (On server A) which is invoked using NTLM credentials.
I have an ASPX page and on this page I have a control that
I have an aspx page that uses a master page. On this page I
I have a treeview control on an aspx page. The data comes from database
I have a panel on an aspx page which contains an UpdatePanel. This panel
So I have a control (a map) on an aspx page. I want to
ASP.NET 1.1 - I have a DataGrid on an ASPX page that is databound
I have an aspx page,where the user will enter a valid image url(ex :
I have an ASPX page where I am uploading an image to server for
I have an aspx page where i am Processing a large number of records

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.