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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:48:54+00:00 2026-06-09T19:48:54+00:00

I have an intranet site which calls a POST method from another server, also

  • 0

I have an intranet site which calls a POST method from another server, also on the intranet.

If I set the Authentication mode to Basic Authentication in IIS I can use the following:

HttpWebRequest oReq = (HttpWebRequest)WebRequest.Create(sURL);
 oReq.ContentType = "application/x-www-form-urlencoded";
 oReq.Method = "POST";
 oReq.Timeout = 60000;

 ...

 oReq.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;

 ...


try
{
   HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
   ...
}

All of the above works as intended.

However I need to change the security to Windows Authentication in IIS, and once I do I keep getting error 401 unauthorized on this line:

try
    {
       HttpWebResponse oResp = (HttpWebResponse)oReq.GetResponse();
       ...
    }

That can be fixed by changing the credentials like so:

NetworkCredential creds = new NetworkCredential("username","password","domain");
oReq.Credentials = creds;

But that’s not the right way anyway. How can I get the default credentials to work for Windows Authentication also?

  • 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-06-09T19:48:55+00:00Added an answer on June 9, 2026 at 7:48 pm

    If you’ve got one web site calling out to another, you’ve got a 2nd hop. This is a kerberos 2nd hop problem.

    The intranet site needs permission to call the 2nd site on behalf on the end user.

    I’d suggest you use a tool call DelegConfig. I can’t recommend it highly enough. Its a simple asp.net application that will tell you what is wrong with your kerberos setup and can tell you how to fix it (or do it itself if you want)

    I’ve found I had to get the client to server authentication working first for it it work, but once thats there it makes working out what wrong with the next hop to UNC/http/sql etc very easy.

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

Sidebar

Related Questions

I have an ASP.Net MVC intranet site which uses Windows Authentication to know who
I have an intranet site with basic authentication. Is it possible to have just
I have an intranet site that loads in IE7 compatibility mode, unless the user
I have a new MVC application which integrates into a larger pre-existing intranet site.
I have here a medium sized intranet site which is written entirely in Zend
In an Intranet environment, I have an FTP server set up for publishing files
I have a basic page which is used in an iFrame on an intranet
I have a public desktop site, a public mobile site, and a private intranet
I'm building a new Intranet Portal with SharePoint 2007 that will have News, Site
I'm creating a little photo sharing site for our home's intranet, and I have

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.