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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:52:12+00:00 2026-05-18T03:52:12+00:00

i am using VS2010 with jquery-1.4.1.js version and i try to access the WCF

  • 0

i am using VS2010 with jquery-1.4.1.js version and i try to access the WCF service and i get a strange error “Access is denied” in jquery-1.4.1.js at page number 4982

jquery-1.4.1.js:

    // Open the socket
    // Passing null username, generates a login popup on Opera (#2865)
    if ( s.username ) {
        xhr.open(type, s.url, s.async, s.username, s.password);
    } else {
        xhr.open(type, s.url, s.async);
    }

here is how i am calling

 function PostData() {           

        var webMethod = 'http://myservices/SomeService.svc/GetCount'
        var parameters = "{'Id': '" + "1" + "'}"
        $.ajax({
            type: "POST",
            url: webMethod,
            data: parameters,
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (data) {
                //$(divToBeWorkedOn).html(msg.d);
                debugger
            },
            error: function (e) {
                //$(divToBeWorkedOn).html("Unavailable");
            }
        });
    } 

what might be the problem? i test my wcf service and it works fine, i try connecting through asp.net and add web reference just to see if there is any problem.

  • 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-18T03:52:13+00:00Added an answer on May 18, 2026 at 3:52 am

    This line is unnecessary:

    contentType: 'application/json; charset=utf-8', 
    

    It tells the server what kind of data you are sending, not what you expect to receive, and you aren’t actually sending any data.


    Edit

    It seems that you are calling a script on another domain. This violates the same origin policy: you can only make AJAX requests to items on the same domain. There is a workaround using something called JSONP, which requires server-side support. See the documentation for $.ajax, especially the JSONP dataType section.

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

Sidebar

Related Questions

Can someone provide me with a HelloWorld JQuery sample app using VS2010 and list
So using VS2010 (or SVCUTIL.EXE) to created a WCF class, it does not generate
Using online interfaces to a version control system is a nice way to have
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
I can't seem to get client side validation working with the version of MVC
In Visual Studio 2010 I created a new Ajax enabled WCF Service [ServiceContract(Namespace =
In VS2010 and ASP.NET MVC 2, it seems that client-side validation (JQuery Futures or
My latest project is using a javascript framework (jQuery), along with some plugins (validation,
Using VS2010 and .NET 4 what exactly does the ADO.NET EF wizard update when
I'm using VS2010 with the Web Deployment Projects to create a release package for

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.