Questions tagged [wcf]

17087 questions
0

votes
0

answer
4

Views

Ways to migrate existing monolithic production application to .net core over time

Slowly migrate a huge (over 100 projects in the solution) monolithic Asp.net Angular MVC application to dot.net core in a modeler/micros service way and containerize it. We have decided to start with the front end UI first as a complete rebuild using asp.net core and Angular. The UI is also huge s...
INK
0

votes
0

answer
6

Views

Wcf client / Java Web service

I should create .NET WCF client who should generate below SOAP request. I spend a lot of time on it but not succeed. Have someone solution to communicate with a SignOnly Java web service from c# WCF client ? LXih7cFZ0xbS7kvta191sVPJDTQ= I5wyj9Yc3rZ+lXegr2KuPdT3phqZrGWhUMTdictlmUUyXw+7OsKNS0AkaJm+W...
Sefer KILIÇ
0

votes
1

answer
17

Views

Using JSON and gzip together in WCF

I need to create an endpoint on the server side (WCF) that will accept requests from the client that will contain headers: Content-Type : application/json Content-Encoding : gzip Accept-Encoding : gzip Is that possible complete without implementing custom MessageEncodingBindingElement? Something lik...
Igor Sychev
1

votes
2

answer
461

Views

How can I use strongly typed parameters in the uri path in WCF with WebHttpBinding

Okay, I've searched a bunch for answers to this question and I can only seem to find articles and documents for .NET 3.5 from 2011 and back... so I'm hoping to find more recent information for WCF in .NET 4.5 (and up). I've got a WCF service that is bound to a webHttpBinding. It uses a Uri template...
BenAlabaster
1

votes
1

answer
15.4k

Views

How to call WCF service method from POSTMAN

I am trying to call a service using WCF endpoint. The WCF service is hosted on a Windows Service, This is the config. And we are trying to call the service with POSTMAN like this: This is the raw body: But, we are getting this response a:DestinationUnreachable The message with To 'http://xx.143.46....
Luis Valencia
1

votes
2

answer
863

Views

How to pass the parameters to WCF Web Service with special characters?

I'm using WCF with C#. I have to pass the parameters to WCF web service with special characters like- [email protected] and [email protected] While passing the parameters, got error "404 Not Found" and if passed parameters without special characters it's working. Working localhost:35798/RestServic...
Ram
1

votes
1

answer
12.1k

Views

The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic Realm’

I am trying to consume SAP WCF webservice, I have this code: var remoteAddress = new System.ServiceModel.EndpointAddress("https://appweb.xx.com/sap/bc/srt/wsdl/bndg_E5BBCE4ACBB46CF1A88900155D0A8410/wsdl11/allinone/ws_policy/document?sap-client=300"); using (var cliente = new ServiceReference1.ZHRW...
Luis Valencia
1

votes
2

answer
644

Views

How to make Simple WCF Service work in WPF Application?

I've been following tutorial here and trying to host a simple REST Server using WCF. Basically, I created the WCF interface and class file as described in the tutorial: [ServiceContract] public interface IService { [OperationContract] [WebInvoke(Method = "GET", UriTemplate = "/GET/{msg}/{msg2}")] st...
Mantracker
1

votes
1

answer
4.3k

Views

Error “An attempt was made to access a socket in a way forbidden by its access permissions”

Running a WCF service for testing on a local machine. In App.config I have: If I run the app from VS2015 (as a regular user or administrator), I get: A TCP error (10013: An attempt was made to access a socket in a way forbidden by its access permissions) occurred while listening on IP Endpoint=0.0.0...
Jakov
1

votes
3

answer
131

Views

IRS-A2A “message was not formatted properly” (TPE1105 - uniqueTransmissionID)

I am working on integrating the A2A channel for the IRS through their WSDL using WCF. I'm able to get passed any code related errors sending the request but currently receiving the following error back from the IRS: The message was not formatted properly and/or cannot be interpreted. Please review t...
Das
1

votes
2

answer
42

Views

How to implement an interface returns IAsyncResult with empty method body

WCF needs me to implement methods like IAsyncResult OnBeginOpen(TimeSpan timeout, AsyncCallback callback, object state) if I want to inherit ChannelBase. As I have nothing to do when the channel is getting opened, I'd rather leave that method body empty. What should I return as IAsyncResult in those...
zh chen
1

votes
3

answer
1.6k

Views

Using generic Dictionary over wcf: what do I need to look for?

Suppose I have a WCF service and a method in the contract _ Interface IThingService '... _ Function GetThing(thingId As Guid) As Thing End Interface where Thing is an ordinary class with ordinary properties, except for one member: Public Class Thing ' ... Public Property Photos() As Dictionary(Of S...
Patrick Szalapski
1

votes
2

answer
2.6k

Views

How to use MessageContract correctly in the WCF OperationContracts?

Can someone point (or answer here, if possible) me to the material/reference which describes how to use MessageContract in WCF operations correctly. I have read this document. I would like to know: 1) What limitations are there while using MessageContract as return value of the operation contract?...
Learner
1

votes
1

answer
61

Views

Object Oriented Communication with WCF

I know that WCF is a message passing system, with specified Service Contract interface declaring methods that can return or take as argument instances of Data Contract classes. My question is : Is it possible to use WCF to implement a kind of Object Oriented Communication? For instance : Could a Ser...
1

votes
3

answer
220

Views

Caching compressed data from WCF on IIS

I have a WCF service hosted on IIS. Size of responses are quite big so I require a dynamic data compression that is enabled on IIS side (Service uses wsHttpBinding). At some point I realize that I need caching of the compressed data too. Each of the requests to server is unique but return only one o...
Anton Kattsyn
1

votes
2

answer
2.7k

Views

How do I change wcf port name and binding?

I am new to WCF. I'm trying to create a webservice from a client provided wsdl; I'm having trouble changing some wcf generated wsdl entries to match the provided wsdl. Here is my wsdl port name : But I need change to How do I that? Can someone please show me a simple solution?
user1782380
1

votes
1

answer
1.1k

Views

WCF Message serialization leaking event handles and unmanaged memory

We have a WCF client and we need to save the request before we send it, however after every serialization there are some leaked windows event handles. We've tried windbg but the handles are created by the clr. Using sysinternals handles.exe reveals that Semaphores and Events are constantly increasin...
Boklucius
1

votes
2

answer
1.8k

Views

WCF Json Rest service not hitting the Methods

I am writing a WCF service, (json REST) and I have it working fine when using the wcftestclient.exe When I run that test tool it triggers my break points while debugging and everything works as expected. but, when using a browser to navigate to the the service and method, no break point is triggere...
SmithMart
1

votes
1

answer
6.8k

Views

How to configure webHttpBinding using user name/password authentication

I am working on a WCF service with webHttpBinding for json ajax calls. The service works fine until I turned on the security part. Here is my web.config. Here is my javascript call. $.ajax({ headers: { "Authorization": "Basic " + Base64.encode('John:Doe') }, type: "POST", url: "https://localhost/St...
Luyin Sun
1

votes
1

answer
688

Views

.NET 4.5 Increase WCF Client Calls Async?

I have a .NET 4.5 WCF client app that uses the async/await pattern to make volumes of calls. My development machine is dual-proc with 8gb RAM (production will be 5 CPU with 8gb RAM at Amazon AWS) . The remote WCF service called by my code uses out and ref parameters on a web method that I need. My c...
Snowy
1

votes
3

answer
461

Views

validate each incoming request

I have two base classes RequestBase and ResponseBase, for request and response respectively. All types of requsets and response derived from these classes. The RequestBase contains ClientKey and AccessToken fields. Also, I have the AuthenticationService service. [ServiceContract] public interface I...
user1260827
1

votes
2

answer
4.4k

Views

Request for the permission failed from a desktop app running on a network drive

The following exception is raised when opening a WCF client from a .NET 4 desktop application. This only seems to be happening at one of our client installations: Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'...
Marcus
1

votes
1

answer
9k

Views

Restful WCF POST issue with application/json content type request

I've configured a RESTful WCF with the following POST "operation": [OperationContract] [WebInvoke(Method = "POST", UriTemplate = "/Test", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json)] void PostTest(Stream stream); In my web.config, I've configured the following: When...
Tomer Peled
1

votes
2

answer
567

Views

General advice on returning success messages in WCF WebMethods

I'm just looking for some general advice with this one please. My WCF WebMethod needs to work across applications using different software, e.g. ASP.NET --> Java, for example. I know that in the event of a method failing, I can utilize FaultException(Of MyError) to generate a SOAP Fault, however, w...
EvilDr
1

votes
1

answer
472

Views

Is XML and SOAP over TCP stateful in a WebService?

TCP is a stateful protocol and it can maintain state between client and server interaction. SOAP maintain communication neutrality and can be used over any transport protocol such as HTTP, SMTP, TCP, or JMS, so if we are using SOAP as protocol for data exchange and it is maintained over TCP prot...
user1888859
1

votes
1

answer
8.4k

Views

wcf rest service consumption in c# console application

I made wcf rest service by going New->projects->WCF Service Application I am unable to use methods in console application while i have hosted wcf rest service and referenced wcf rest service in application My Application code is below : IRestServiceImpL [ServiceContract] public interface IRestServi...
Shoeb
1

votes
1

answer
1.2k

Views

New DateTime object giving null reference exception in WCF

I am a newbie to WCF so please bear with me. Why would I be getting a NullReferenceException occured when trying to create a new DateTime object in my WCF service. This is the line of code: DateTime fromDate = new DateTime(DateTime.Now.Ticks); I have tried various approaches like: DateTime fromDate...
Willem
1

votes
2

answer
59

Views

wcf configuration questions

I'm still new to WCF and had a few questions on why certain sections are needed, if they are, in WCF: 1) I have a application which uses a WCF service to talk to the database. I setup a test SSL certificate on my local machine and setup the web.config of the WCF service as: Since I have SSL setup I...
Paritosh
1

votes
1

answer
1.1k

Views

How to authenticate hosted wcf service with username and password?

I have hosted a wcf service in an server which runs fine in that server. I try to add a service reference of that service which also added successfully in another server and then try to authenticate these service like below var engServiceClient = new EngServiceClient(); engServiceClient.ClientCreden...
Code-EZ
1

votes
1

answer
979

Views

Discovered WCF service can't connect

I have a WCF service that I'm using to expose a data source (connected to via an EF model). My endpoint for some reason just stopped responding. Up until my last changes I was just pulling the data at startup of my app. I'm now working on adding a subscribe/publish model on top of this so I can thro...
Mike
1

votes
2

answer
432

Views

Does the <domainService> Tag still work for Silverlight 5 and RIA Services?

I am trying to add a JSON endpoint to a WCF RIA Service. I have read many tutorials on this and I have also watched videos on silverlight.net. Everywhere I find something on this topic, I am told to use the domainService Tag in web.config. One code example looks like this: This is not working and...
Michael
1

votes
2

answer
3.2k

Views

.net WCF GET HTTPS 400 Bad Request but woks fine with Http

I have a WCF on a windows Server 2008 R2. I have a SSL certificate. With IE, the http URL working fine (I get my data) but with Https I have a 400 Bad Request. Could you help me please? below the web.config for my wcf :
Dave
1

votes
2

answer
71

Views

Combining 2 SQL queries from a WCF service

Basically I don't know how to query my database so it returns only fields containing username and date. I can query them separately but not together. However there's no option for AND in intellisense. These are the 2 queries: [OperationContract] public List GetUsersSpecific(string DateToSearch,...
Rhys Drury
1

votes
1

answer
1k

Views

Omitting null/default values in wcf rest template 40

I have a web service that uses the WCF REST Template 40. The way my data is set up, there are no [DataContract] or [DataMember] attributes on anything, it is just the class and its public properties. Example: public class Permission : ServiceClass { public int PermissionID { g...
Matt Grogan
1

votes
2

answer
2.7k

Views

TransactionScope in WCF

Given below is my sample code. They are all synchronous call to service from client. My question here is, How my remote service will know about the call -> ts.Complete(); using (TransactionScope ts = new TransactionScope(TransactionScopeOption.RequiresNew)) { try { ServiceReference1.Service1Client o...
Al.
1

votes
4

answer
1k

Views

WCF Service VS ASP.NET Web Api for Quiz Application [duplicate]

Possible Duplicate: WCF Service or Web API Hi guys i am developing a quiz engine application, I want to create a service that can be accessible from different client platforms e.g android, PHP, Iphone, IPad, Java e.tc. Between WCF and Asp.net web API which you think best suits the scenario? Thanks
1

votes
1

answer
1.3k

Views

Microsoft.Samples.GZipEncoder with [WebGet(ResponseFormat=WebMessageFormat.Json]?

With the help of this question and this post I've managed to get WebHttpBinding to work with compression (by means of copy-pasting the code). When pointing the browser to my service method, it downloads a file which I can rename to .zip and decompress, so the compression part works. But I'm not able...
Lescai Ionel
1

votes
1

answer
5k

Views

WCF Service not writing to Event Log

Below is the code I use to initialize the event log, and below that is a sample line of code I use to write to the log. private string sSource = "DaVinci"; private string sLog = "WCF WebService"; //Initialize Event Log if(!EventLog.SourceExists(sSource)) EventLog.CreateEventSource(sSource, sLog); /...
NealR
1

votes
2

answer
985

Views

Send NSData to WCF Service using JSON

I am trying to upload a file from iPhone to the Web Site using WCF Service. The WCF service has a lot of methods that I can call from the iPhone successfuly except this one. [OperationContract] [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json,...
Mahmoud Fayez
1

votes
3

answer
398

Views

Highly Maintainable Web Services and adding new Command/Query handlers

I have started with this project in an attempt to learn CQRS and write maintainable WCF services. However, I have some general questions on WCF. Every time I add a command/query handler contract and handler, I build the projects and then right click the service reference on the client in Visual Stud...
BBauer42

View additional questions