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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:06:22+00:00 2026-05-29T22:06:22+00:00

I am having difficulties authenticating a HttpWebRequest to a webserver. The response I am

  • 0

I am having difficulties authenticating a HttpWebRequest to a webserver. The response I am receiving is simply a 401. I’ve made sure I set the credentials correctly on the C# side, and IIS is correctly set to allow NTLM authentication. I don’t know if this matters, but he computer is not on the same domain as the the web server.

I am sure the user/pass is correct but are there any other authorization settings needed to configure on the user?

If I enable Basic authentication, and disable Windows Authentication, the request works perfectly (with the correct C# code changes of course).

What am I missing?

    webRequest.UseDefaultCredentials = false;
    webRequest.PreAuthenticate = true;
    var c = new NetworkCredential("User", "password", "domain");

    CredentialCache credentialCache = new CredentialCache();
    credentialCache.Add(new Uri(Url), "NTLM", c);
    webRequest.Credentials = credentialCache;

Heres a snapshot of my settings in IIS.

IIS Authentication Configuration

Failed Request Tracing:

Tracing Error Log

  • 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-29T22:06:24+00:00Added an answer on May 29, 2026 at 10:06 pm

    With the help of a colleague, we were able to determine something was wrong in the way Windows was dealing with the authentication. Looks like a setting in the Local Security was wrong. Changing Local Policies > Security Options > Network access: Sharing and security model for local accounts from Guest only – local users authenticate as Guest to Classic fixed the problem.

    enter image description here

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

Sidebar

Related Questions

i'm playing around with flickr API lately and having difficulties in parsing their response
I'm having difficulties removing the lineStyle lines in JTrees using Netbeans. In a standalone
I'm having difficulties with multiple joins in the NHibernate Criteria search. Say I had
I am having difficulties when trying to insert files into a SQL Server database.
I am having difficulties getting a span tag to work properly inside a table.
I'm having difficulties handling multiple instances of my root (main) activity for my application.
I'm having difficulties getting XslCompiledTransform.Load method to take a server path. I googled around
I am having difficulties with forms, specifically ModelMultipleChoiceField. I've pieced together this code from
I am having difficulties how to construct my question, but if I have to
I'm having difficulties with a Combobox in a userform in an Excel document. The

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.