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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:32:42+00:00 2026-05-25T11:32:42+00:00

I have a web application that allows anonymous access and windows authentication. Basically, the

  • 0

I have a web application that allows anonymous access and windows authentication.

Basically, the app try to auto-login users by windows authentication if the windows user is in a user list in the application, otherwise it shows the login screen. If no credential is provided, the app then shows a login screen where the user could login using a application internal user.

As far as I know, Windows Authentication is a challenging protocol, so I have to return an Unauthorized in order to force the browser to send the credentials.

It works great when are machines inside my domain.

Machine in my domain which the user is in the list:

  • browser issue request with no credentials.
  • web app custom authorize filter reject the connection (challenge).
  • browser reissue the request with the windows credentials.
  • web app authenticates that windows user and allow it get it.

Machine in my domain which the user is not in the allowed list:

  • browser issue request with no credentials.
  • web app custom authorize filter reject the connection (challenge).
  • browser reissue the request with the windows credentials.
  • web app fails to authenticate the request and redirect to the login screen.

Now comes the problem.

Machine out of my domain which the user is not in the allowed list:

  • browser issue request with no credentials.
  • web app custom authorize filter reject the connection (challenge).
  • browser shows a windows login screen, and it doesn’t reissue the request.

Why the request is not reissued when the server is returning unauthorized?

If I close the auth dialog, and refresh the browser, then the app redirects to the login page.

Regards.

  • 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-25T11:32:43+00:00Added an answer on May 25, 2026 at 11:32 am

    Well, if the computer is outside the server domain, the browser won’t try to send the credentials (as it would be probably pointless in terms of Windows authentication) and it will prompt for credentials after the first HTTP 401.

    The solution is enable Anonymous authentication and Windows authentication together, and let the LogOn page be accessed anonymously. In the LogOn page place the login controls, and a button named for example “Windows Login” that navigates to an action method named “WindowsAuth”. In that action method, return HttpUnauthorizedResult if not Request.LogonUserIdentity.IsAuthenticated, and redirects to Home otherwise, that will force the browser to send the Windows credentials.

    If a browser outside of the domain tries to do a “Windows Login”, it will get a nice “HTTP 401 Unauthorized” page, so he can hit back and perform login in the traditional way.

    I hope this helps somebody.

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

Sidebar

Related Questions

Let say, I have a web application that allows users to upload images and
We have created a web application, using ASP.NET, that allows users to upload documents
I have an ASP.Net 2.0 application that uses integrated Windows Authentication to authenticate/authorize users.
I have a ASP.NET web application that allows end users to upload a file.
I have a .net web app hosting in IIS6 with Windows Authentication and anonymous
I have a web application that allows users to upload certain documents relevant to
I have a Java Google App Engine web application that allows user upload of
I have a web application that allows a user to search on some criteria,
I have a bowling web application that allows pretty detailed frame-by-frame information entry. One
I have a web application that should behave differently for internal users than external

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.