Questions tagged [wcf]

Windows Communication Foundation, also known as WCF, serves as an integral component within the .NET Framework. Offering a cohesive programming model, it empowers developers to construct service-oriented applications swiftly and efficiently.

ASP.NET JSON web service for the disillusioned php enthusiast

Having worked as a PHP developer for a number of years and creating numerous APIs using JSON, I find it quite simple to create a URL that performs a task and returns json_encode($array). Piece of cake, right? However, my previous experience as a .net deve ...

Angular2 HTTP POST request

I am currently in the process of upgrading an Ionic v1 application to Ionic v2. One of my methods involves calling a WCF service. In AngularJS, I would do it like this: $http({ method: 'POST', url: url, data: JSON.stringify({ dato: 11 }), dataType: "j ...

Discover the Secrets of Securing User Authentication in AJAX-based WCF Service Calls

I am currently working on a WCF service that requires client-side (ajax) calls. I am considering two options: either using ScriptManager on the ASPX page to add a ServiceReference to the WCF service, or making JQuery ajax calls directly to the WCF servic ...

Returning Json Data with WCF

My issue and requirement are as follows: // Listed below is one of my class functions named User, with 10-15 more similar functions. public IEnumerable<Entity.User> User() { OpenStoredPorcedure("spDB"); DataSet d = ExecuteData ...

Error Code - WCF communicating with jQuery Post

Whenever I try to access the Stats from my WCF Service, I keep getting a Bad Request Error 400. Even after removing the date parameter and checking for potential causes, the error persists. function WCFJSON() { //var now = new Date(); //var getFromDate = ...

Alternative technologies that have the capability to execute DTO request response similar to WCF

My current WCF service allows me to submit a request using a DTO and responds with another DTO for my WPF application. For instance, I can send a filter object for products containing filtering properties and additional paging information, and in return, r ...

Troubleshooting: Issue with WCF service not processing POST requests

I encountered an issue when attempting to call a WCF service using AJAX from another project. The error message displayed was: The server encountered an error processing the request. The exception message is 'The incoming message has an unexpected message ...

The specified message formats required for the operation include 'XML' and 'JSON'

Creating a WCF REST service includes defining methods for adding, deleting, and editing news entities. Here is an example of such a service: [ServiceContract] public interface INewsRepository { [OperationContract] [WebInvoke(Me ...

jqGrid is failing to display basic JSON data properly

As a newcomer to Jquery and Json, I am struggling with binding a JSON object from a RESTful Webservice written in WCF to jqGrid. Despite saving the JSON object as a static file and attempting to bind it to the grid, I realized that the issue does not lie w ...

Returning a List in JSON format using WCF REST

Is there a way to return a List of Users in JSON format using WCF with Rest? My Endpointconfiguration is already functioning properly. [OperationContract(Name = "GetUsers")] [WebGet(UriTemplate = "GetUsers", ResponseFormat = WebMessageFormat.Json, Reque ...

Using jQuery to communicate with a WCF service via Ajax results in receiving a bad

I'm struggling to set up an auto-complete feature, where I can successfully retrieve JSON data using Fiddler. However, when I try to implement it in my code, I keep encountering a connection error. Here is the code snippet: <htm> <Head> </h ...

Can a WCF service utilize both the SOAP and JSON methods simultaneously?

I recently started working with WCF, and I need to utilize the same WCF for bothSOAPandJSON` formats using the post method. Is this achievable? Any guidance would be greatly appreciated. ...

Issue with Ajax-Enabled WCF Service (JSON) encountered during utilization with jquery .ajax()

Regrettably, the error condition is only triggered when calling .ajax(), and textStatus (the second parameter) merely displays "error". Despite thoroughly examining multiple examples and other inquiries on stackoverflow, I seem to be overlooking something ...

Using jQuery to interact with a web service - overcoming cross-domain restrictions

Attempting to connect to a WCF service using a jQuery client. Referencing this specific example: http://www.codeproject.com/KB/aspnet/WCF_JQUERY_ASMX.aspx#4 Everything functions properly when the client webpage is on the same domain as the service. Howe ...

"Encountering an Error in Linq Query Due to Union Operator Usage

Integrating a WCF service into an AngularJS web application has presented a challenge. With two tables in the database, the goal is to join their records into a single record for display in the AngularJS application. When both tables have records, retrieva ...

Troubleshooting issue with WCF deserialization and polymorphism

I have developed a set of classes, including a base class called IObject and two derived classes named A and B. [KnownType(typeof(B))] [KnownType(typeof(A))] [DataContract(Name = "IObject")] public class IObject { } [DataContract(Name="A")] public class ...

C# - Parsing JSON with JObject - Incorrect JSON Format

I am currently handling an API that returns JSON data. There is a method in place that calls the API and extracts the necessary nodes from the JSON response. Everything has been working smoothly so far, but the latest JSON response seems to be malformed. ...

Struggling to properly structure WCF JSON data for HighCharts integration?

I am having issues binding my WCF JSON data to HighCharts Pie. When I hardcode the data, it works fine but dynamic data processing does not seem to work. Original from WCF -[{"AllRecordsUrl":"http:\/\/EMS\/sites\/IST\/report.aspx ...

What is the process for invoking a websocket from an HTML client?

I have created a WCF Service using netHttpBinding binding and it is hosted on IIS 8 (Windows Server 2012). The interfaces for the service are as follows: [ServiceContract(CallbackContract = typeof(IDuplexCallbackContract))] public interface IHelloWebSocke ...

ajax request encountered access denial when attempting to call wcf service

I have set up an Amazon EC2 instance and deployed my .NET web application on port 80, with the WCF service running on port 1212. While I can access both the application and service locally on the remote session, attempting to make Ajax requests over the i ...

Transmitting various parameters with XMLHttpRequest and Windows Communication Foundation (WCF

My goal is to pass multiple parameters to a WCF service, where the server side logs incoming data. I can see errors 1 and 2 being logged, but not 3 and 4. I attempted debugging to step through the code, but the client-side javascript call isn't triggering ...

The WCF Service is experiencing issues when attempting to call a client for accessing REST with JSON, as the correct content type is

I've been struggling with a perplexing issue for the past few days - I'm trying to utilize a WCF service to call another RESTful service. However, as I trace through the process, it consistently fails to set the appropriate JSON content type on the messag ...

Unpacking a GZip Stream retrieved from an HTTPClient's Response

I'm attempting to establish a connection to an API that returns GZip encoded JSON from a WCF service (WCF service to WCF service). Utilizing the HTTPClient, I've managed to retrieve the JSON object as a string. However, my goal is to store this d ...

Wcf Service does not define Angular JS methods

I am utilizing a WCF Service within an AngularJS application. The WCF Service is functional, and I am attempting to display a list of user records from a SQL database. However, upon running the application, I encountered the following errors: angular.js: ...

JSON response and service status in a WCF REST service

A WCF REST service is returning a JSON response as follows: { "categories": [{ "category_id": "10", "name": "Grocery", "freeQnty":"0", "prdcost":"100" }, { "category_id": "20", "name": "Beverages", ...

Tips for changing the JSON result of a method in a WCF service

I'm currently exploring how to customize the name of the JSON object returned from a WCF service to a web client via an AJAX call, rather than using the default wrapper. Despite my efforts, I haven't been able to find any relevant articles on this topic. I ...

The WCF response has been deemed invalid because of the presence of an unexpected string combination involving WCF and JSON

I recently set up a WCF service to interact with JSON data, but I'm encountering an issue where all entries are being escaped. [ { "rel":"http:\/\/localhost:3354\/customer\/1\/order", &qu ...

The .SVC file's generated Javascript proxy URL fails to function properly when used with SSL

The ASP.Net web site I have deployed in IIS 7.5 includes a file named Cart.svc, which is used for accessing JavaScript from the browser. While the JavaScript functions fine without SSL, enabling SSL causes it to stop working. Interestingly, removing the / ...

Submitting an intricate item to a WCF REST API using JQuery

Currently, I am attempting to send a complex object to my WCF REST service. Utilizing this method seems to be the most straightforward way to upload a Stream type object along with other parameters to an endpoint simultaneously. Service: [OperationContra ...

transferring JSON information from the client to the service

In order to incorporate RESTful architecture into an existing SOAP service, I am modifying the service interface by adding WebGet and WebInvoke attributes. These attributes allow for both REST and SOAP compliant services. Following this CodeProject tutoria ...

Implementation of the WCF POST method

I am currently working on a WCF service that communicates with an SQL server database from a mobile application. One of the methods in this service is responsible for creating bookings. public void CreateBooking(Booking booking) { ...

The WCF response from the Ajax call reported that the incoming message had an unexpected format of 'Raw'. The operation was expecting different message formats

Help needed with .NET framework 3.5. I'm facing an issue with my Get WCF services, even though they seem to be working fine using the same method. Can't pinpoint what's causing the problem. WCF: [OperationContract] [WebInvoke(Metho ...

Transmit data from the Windows Communication Foundation to JavaScript

Looking to invoke the WCF service through JavaScript, utilizing AJAX? Check out this resource: Calling WCF Services using jQuery Here's my query: Is there a method to retain some JavaScript-related data after making a request, and then transmit informat ...

Learn the process of merging queries from two tables and grouping them into a JSON Array on a WCF Service

I have two tables in my SQL Server Database and I would like to combine them into a single JSON Array within my WCF Service. Table1: ---------------- | type | total | ---------------- | A | 2 | | B | 3 | | C | 4 | ---------------- T ...

What is the process of invoking a WCF service from a test runner?

I recently started exploring Selenium WebDriver to create black box integration tests. At the moment, I am using MSTest as my test runner. However, when attempting to call a WCF service to support my work, I encountered an error: The error message state ...

Dealing with the complexities of Jquery Ajax and WCF Webservice integration:

I have developed a WCF Webservice method that accepts two parameters, both strings, and returns an XmlElement. Currently, I am encountering issues with an ASP.NET page that contains a JQuery AJAX call to this method. Despite trying to troubleshoot using o ...

Allowing the OPTIONS method in CORS when sending a REST request from AJAX to a WCF Service

After spending 7 hours scratching my head, I am still unable to figure this out. Despite my extensive search on the web, no luck has come my way. My Angular App is sending requests to a WCF command-line hosted service application. To bypass CORS, I utilize ...

Steps for implementing a single proxy in JavaScript AJAX with SOAP, mirroring the functionality of the WCF Test Client

I am working with a WCF web Service and a javascript client that connects to this service via AJAX using SOAP 1.2. My goal is to pass a parameter to instruct the AJAX SOAP call to use only one proxy, similar to how it is done in the WCF Test Client by unch ...

Handling a WCF POST request with JQuery resulting in a 400 Bad Request HTTP Response

I'm encountering an issue with my JQuery POST not being accepted by the WCF Service. Below is the JavaScript code for the POST: function jqueryPost() { var url = "/LoggingTest"; $.post(url, { message: "test message" }); } To handle the POST reque ...

Encountering a configuration file issue when attempting to consume a WCF service using an Ajax

Currently, I am encountering an issue when trying to consume a WCF service using jQuery. The error message I received is "Configuration binding extension 'system.serviceModel/bindings/webHttpbinding' could not be found. Verify that this binding e ...

Is it possible to use JavaScript or jQuery to call a WCF Service and retrieve a collection of System.IO.Stream objects?

I am developing a WCF service that will be utilized by plain JavaScript on the client side, as well as some jQuery JavaScript. 1) How can I set up the plain client JavaScript to call the WCF Service in a manner that retrieves a collection of System.IO.Str ...

Executing a Control Method in ASP.NET MVC with the Help of JQuery or AngularJS

I currently have an application that is running in MS Silverlight on the client side, with a WCF SOAP service hosted in IIS serving as the business layer, and SQL handling the database. However, I have been tasked with transitioning the front end from Silv ...

Sending Time and Date information from JSON to WCF POST

I have a class structure similar to the following: public class BudgetTransactionRequest { [DataMember] public string transaction_code { get; set; } [DataMember] public double? amount { get; set; } public Dat ...

Building a WCF Rest Service for Sending Large Files to ASP.NET MVC: A Step-by-Step Guide

Is it possible to utilize WCF in developing an endpoint for uploading large files on a website through an ASP.NET MVC controller method, while updating a jQuery progress bar in the browser using Ajax or Json? What are the steps involved in accomplishing t ...

problem with sending JSON data as a string

I am trying to send a property of type 'string' to a WCF server. The string will contain JSON data, but I keep encountering this error: The server has encountered an error while processing the request. The exception message is 'There was an ...

In RESTful WCF, the child class/entity consistently comes back as null

I have a class structure set up like this namespace Eauction { [DataContract(Namespace = "")] public class SaleListJS { public SaleListJS() { this.SaleDataJS = new HashSet<SaleDataJS>(); } [DataMember] public string Aucti ...

Tips for interpreting Json data received from a WCF service in HTML with the help of AJAX technology?

Can anyone assist me with retrieving data details from a JSON model? I am utilizing a WCF service that returns JSON data and it works fine as I have tested it using WebClient. However, I am having trouble displaying the data on my HTML site. Despite trying ...

The JQuery button fails to activate the service call through Ajax

I'm facing an issue with my JSON service while trying to make an AJAX call using jQuery on a webpage. Even though I have created a button and attempted to trigger the click event, I am not receiving any alert message and the service call itself is not bein ...

Dealing with null values sent from a WCF service in the client application

Utilizing a WCF Service, I have incorporated AJAX to invoke the service methods from my web application. The AJAX call is structured as follows: $.ajax({ type: 'GET', url: 'http://localhost:56083/Service1.svc/Web/GetIntegrationById ...

Using nested JSON in POST request input

When utilizing Fiddler to invoke my method, I am now facing an issue with the parameters. The structure of these parameters is as follows: {"timestamp":"", "json": { "something":[{"text":"bla","status":"1"},{"text":"sfdf","status":"1"}], ...

A peaceful WCF service initiates a client callback whenever a server update occurs

In the process of developing a WCF RESTFUL service on top of a c++ console application, I am confronted with an issue. The client accesses this c++ application through my restful wcf service using a browser. Every time there is an update received by my w ...

Obtain input from request payload in WCF/ADO.NET Data Service

Why are my parameters getting lost when I try to post to an ADO.NET Data Service? This is what my code looks like: [WebInvoke(Method="POST")] public int MyMethod(int foo, string bar) {...} Here's how I'm making the ajax call using prototype.js: var arg ...

Get a collection of strings from a WCF service triggered by jQuery

After calling my service to retrieve a list of strings, I encountered an error message. $(document).ready(function () //executes this code when page loading is done { $.ajax({ type: "POST", url: "Services/pilltrakr.svc/getAllUsers", ...

Problematic JSON Responses from WCF Service

In my WCF Class Library, I have a function called SampleJSON(string name) with the following Operation Contract: [OperationContract] [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, UriTemplate = "sample/{name}")] string SampleJSON(strin ...