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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:17:09+00:00 2026-06-06T16:17:09+00:00

I am trying to access a webservice that has Windows authentication . I am

  • 0

I am trying to access a webservice that has Windows authentication. I am basically using most of what is written on this page:

$.ajax({
    url: url,
    method: 'GET',
    async: true,
    data: {},
    dataType: 'json',
    crossDomain: true,
    xhrFields: {
        withCredentials: true
    },
    beforeSend: function(xhr) {
        // set authorization header
        xhr.setRequestHeader("Authorization", "Basic " + Base64.encode(username + ":" + password));
    },
    success: function(data){
                // success
    },
    error: function(request, status, error) {
        // handle problem
    }
});

I also defined the external hosts on the .plist file. My issue is that I always get an error. To make it worst, nothing comes out on the error function that is slightly useful (this output is from Firefox, to simplify):

Object { readyState=0, status=0, statusText="error"}

I also tried on the simulator, but instead of immediately giving me the error I think its timing out. What I have been seeing, and what I am using, is a request using Basic authentication. So is there a way to actually implement this using Windows authentication?

  • 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-06T16:17:11+00:00Added an answer on June 6, 2026 at 4:17 pm

    In the end what I did:

     $.ajax( {
                                 url:webServiceLink,
                                 method: "GET",
                                 timeout:30000,
                                 data: "{}",  
                                 dataType: "xml",
                                 beforeSend : function(req) {
                                 req.setRequestHeader("Authorization", 
                                                      make_base_auth (username,password));                             
                                 },
                                 success: OnGetMemberSuccess,
                                 error: OnGetMemberError
                                 });
                          });
    

    In the external hosts I putted: *.


    Update 1.0: Stopped working again…

    Update 2.0 Found the issue:

    The base 64 encoding is accepting the following chars:

    _keyStr : “ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=”,

    If you put a login/password with something else, you will have problems. 🙂

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

Sidebar

Related Questions

I am trying to access a webservice from my server using this tutorial consume
I'm getting this error when trying to access my webservice running inside tomcat. Caused
I am trying to access a restful web service using jQuery Ajax but getting
I am trying to access a WCF web service, that is using two way
I'm trying to write some documentation for a webservice that has been provided by
I am just trying to access a webservice or any webpage for that matter
I'm using Flex and am trying to access a Web Service. That web service
I am trying to access http://services-staging.cmtnyc.com/payment/payment.asmx web service and AuthorizeCreditTrip I checked this webservice
I'm getting this exception when trying to access a JAX-WS webservice running on the
I am trying to implement a web service that uses open JPA to access

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.