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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T12:16:07+00:00 2026-06-16T12:16:07+00:00

I have developed WCF rest service and deployed it on a link that can

  • 0

I have developed WCF rest service and deployed it on a link that can be accessed via the browser because its action is “GET”.

I want to get that data using jQuery. I tried my best to get WCf get response using jQuery
but in vain. I also tried $.Ajax with ‘jsonp’ with no luck. Can any one help me?

The url is: http://www.lonestarus.com/AndroidApp/AndroidLocation.svc/RestService/getLatestLocation

You can check that url response by pasting url in browser.

  • 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-16T12:16:08+00:00Added an answer on June 16, 2026 at 12:16 pm

    You need to set Access-Control-Allow-Origin to value [*] in your response header.

    this blog gives the more details how it can be done in WCF REST service

    if you were to do this in Web API you could have just added

     Response.Headers.Add("Access-Control-Allow-Origin", "*")
    

    calling the service using a fiddle

    $(function() {
    
        $.ajax({
            url: "http://www.lonestarus.com/AndroidApp/AndroidLocation.svc/RestService/getLatestLocation",
            datatype: 'json',
            type : 'get',
            success: function(data) {
                debugger;
    
                var obj = data;
            }
    
        });
    
    })​;​
    

    I got the error

    XMLHttpRequest cannot load
    http://www.lonestarus.com/AndroidApp/AndroidLocation.svc/RestService/getLatestLocation.
    Origin http://fiddle.jshell.net is not allowed by
    Access-Control-Allow-Origin.

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

Sidebar

Related Questions

I have developed an rest enable wcf service by using the following link http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/simplerestservice11172009221218PM/simplerestservice.aspx
I have developed a sample WCF REST service that accepts that creates an Order
I have developed an ASP.NET application that includes a WCF service. This service needs
I have developed a WCF service that has been working fine for a few
I have developed a WCF service and, while in Visual Studio 2010, I can
Here at work we have developed a SOAP WCF API that can be reached
I have developed a VB.NET WCF service that recives and sends back data. When
I have developed the WCF web service in vb.net in visual studio 2010 express
I have developed a Web service using WCF Service Application. This service application is
I have some WCF RESTful services that were developed with WCF 3.5 + RESTful

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.