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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:13:09+00:00 2026-06-15T19:13:09+00:00

I have a password protected website running on WinCE that, upon attempting to access

  • 0

I have a password protected website running on WinCE that, upon attempting to access the secure pages, will automatically fire up the built-in browser log in box using WWW-Authenticate.

I want to be able to test whether the user is logged in or not by accessing that page. The issue is that when I try this using a jQuery ajax request the browser pops up the login box as it would if the user had navigated there! How can I prevent the login box from opening and instead have jQuery just throw an error instead

Running the following code:

$.ajax({
url: '/web/secure/securepage.html',
success: function(data){ console.log(data) },
error: function (xhr, ajaxOptions, thrownError) {
        alert(xhr.status);
        alert(thrownError);
      }
});

Makes this box appear instead of just failing with an error message

enter image description here

  • 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-15T19:13:10+00:00Added an answer on June 15, 2026 at 7:13 pm

    You are using HTTP authentication. If the client is not logged in you will get login box (AJAX or otherwise).

    If it is possible for you to keep an insecure page within the path /web/secure/ then you can try to create an ASP ‘login test’ page as follows:

    1. Create an insecure ASP page (without HTTP authentication) in the folder /web/secure/. You can name it like /web/secure/logintest.asp.
    2. Send the AJAX request to /web/secure/logintest.asp (it is the page you created above. Since it’s insecure you won’t get the login popup).
    3. Check on the ASP page whether the request headers contain an Authorization value (e.g. Authorization: Basic amltbXk6cGFnZQ==) using Request.ServerVariables("Authorization"). If the header value exists it means the user is authorized and send the success status code (200) else send a client failure code (4xx).
    4. Check the response of your AJAX request on the client and do your stuff.

    Try reading through ASP for Win CE here.

    The thing I am counting on here is that once the HTTP authorization is successful the browser always sends the Authorization header for consecutive requests under the same server path (hence the need to create the insecure page within /web/secure/). If the user is logged in you will be able to judge it by retrieving the header on the ASP page.

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

Sidebar

Related Questions

I have a password-protected website in Flash CS4. I want to make so that
I have a directory on a website that is password protected via htaccess. I
I have an excel spreadsheet that is password-protected. I need to open this spreadsheet
I am building a basic password protected area on my website and I have
We have some folders on our website which are password protected through a PHP
I'm attempting to password protect my public folder so that anyone trying to access
I have protected a directory where my website is placed with password (.htaccess +
I have password protected my entire website using .htaccess but I would like to
I have an ASP.NET website on a Windows 2003 Server, that needs to access
I have a project (private, ASP.net website, password protected with https) where one of

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.