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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:14:34+00:00 2026-05-20T17:14:34+00:00

I am facing problem in consuming wcf service.The responce in ajax is going to

  • 0

I am facing problem in consuming wcf service.The responce in ajax is going to error function. The url is perfectly right.

    $.ajax({
            type: "post",
            url: "http://192.168.1.3:16150/ajaxnewclinicalhost/Service.svc/gettablejson1",
            data: "{}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (msg) {
                alert(msg);
            },
            error: function () {
                alert("error");
            }
           });

Web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.web>
        <compilation debug="false" targetFramework="4.0">
            <assemblies>
                <add assembly="System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /></assemblies></compilation>
    </system.web>
    <system.serviceModel>
        <services>
   <service name="newclinicallibrary.Service1">
    <endpoint address="" binding="webHttpBinding" bindingConfiguration="" behaviorConfiguration="WEB" contract="newclinicallibrary.IService1" />
   </service>
  </services>
  <behaviors>
            <serviceBehaviors>
                <behavior>
                    <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
                    <serviceMetadata httpGetEnabled="true" />
                    <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
                    <serviceDebug includeExceptionDetailInFaults="false" />
                </behavior>
            </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="WEB">
          <webHttp />
        </behavior>
      </endpointBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    </system.serviceModel>
    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true" />
        <directoryBrowse enabled="true" />
    </system.webServer>
</configuration>
  • 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-20T17:14:35+00:00Added an answer on May 20, 2026 at 5:14 pm

    Whenever making AJAX calls, you should bear in mind that for security reasons the browser will only allow requests to be made to URLs on the same domain as the page itself. So unless your page is being served up from http://192.168.1.3, you wont be able to make AJAX calls to your WCF service.

    If this does turn out to be the case, you could try one of the following:

    • Host your WCF on a sub-domain of your website (might still suffer from security issues due to the differing port).
    • Write an intermediate script in your website which brokers requests to your WCF service.
    • Don’t use WCF – instead house your functionality in a script in your website. If you are using ASP.NET, then an ASHX or web module would be suitable.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am facing problem with the return type for this function and not really
iam facing problem in passing array to view. this is my controller code.. function
I am facing problem in intercepting and changing request url to link it with
I am facing problem while implementing https with webHttpBinding. I am getting below error
I am facing problem with connection time out,during jquery ajax operation. The problem scenario
Breeze.js - + Facing problem while accessing service metata. Request for metadata is sent
I am facing problem when url is redirected. I set webviewclient and It is
Iam facing problem in understanding and converting a matlab code into opencv. I want
I am facing problem while setting focus in EdiText. Below is my EditText property.
I am facing problem of duplicate rows in the JXTable . If I sort

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.