Questions tagged [wcf]

Windows Communication Foundation is a part of the .NET Framework that provides a unified programming model for rapidly building service-oriented applications. This integrates various other(.net\java\MSMQ) technologies. The primary focus on the interoperability of different stacks of communication.

Filter by
Sorted by
Tagged with
5 votes
1 answer
637 views

Parallel Calls to External WCF Service - ASP.NET Web Api

I have come across a situation where I feel running some code in parallel will greatly improve performance, but I am concerned about the implementation and am looking for some confirmation. Take the ...
ZMJ's user avatar
  • 51
1 vote
3 answers
2k views

Code to pass json data with WCF REST POST

I have a WCF REST POST that has JSON data as input, IService.cs: ...
IngTun2018's user avatar
1 vote
1 answer
1k views

Properly disposing of a WCF connection using IDisposable

This is a follow up question to this question: https://stackoverflow.com/questions/4573526/what-could-be-causing-a-cannot-access-a-disposed-object-error-in-wcf I have created a WCF service and it is ...
CodeMonkey's user avatar
1 vote
1 answer
160 views

Map client application's DTO to service-proxy's DataContract

My idea is to not not expose/use service's Proxy everywhere throughout the application, rather exercising all service communications(using client Proxy) from a single class. To achieve this I have ...
Anil Kumar's user avatar
3 votes
1 answer
119 views

Multiple WCF Service with boilerplate error handling

I have several (12) WCF services which are structured like this: I have inherited a very large 10-year-old project, I've introduced some inheritance so that I can have 1 echo method where I can ...
aydjay's user avatar
  • 663
2 votes
1 answer
2k views

Service Layer, using Entity Framework 6.2

I would like you to review a part of my warehouse application, a Service Layer to be exact. The architecture of the program is: DB --> .Data (EF's DbContext/...
Marshall's user avatar
1 vote
1 answer
1k views

Static wcf client to make multiple request with one object

I want to make a static client to call a wcf because the first time I call the wcf it takes too long, even sometimes it throws time out. I have the following class: ...
Sxntk's user avatar
  • 113
3 votes
0 answers
2k views

wcf service client wrapper for asp.net core

My goal is to grab some data inside asp.net core app on server from external source via wcf service. In future i would like wcf responses to be cached on server and provide asp.net app clients "normal"...
Pavel's user avatar
  • 131
1 vote
0 answers
1k views

Asset management system

I'm relatively new to developing and I'm mostly self taught so a lot of what I know simply comes from googling & figuring things out from there! That being said I've put together an ASP MVC ...
Paul Evans's user avatar
14 votes
6 answers
187k views

Generic Null/Empty check for each property of a class

I have created a method to check for null/empty values of class properties and if any null property is found I'm stopping the checking process and returning the result as true. I've used a solution ...
Sahil Sharma's user avatar
0 votes
1 answer
2k views

Method or helper function to return objects from EntityFramework with Linq [closed]

The following code reads from Microsoft EntityFramework 6.0 domain model and returns the single view_patient object. The view_patient object is defined in the backend database and uploaded to the ....
Alan Wayne's user avatar
3 votes
0 answers
1k views

Workaround proxy to be able to call 32-bit dll

I had a problem that I posted on StackOverflow about that I could not connect to windows phone 7 from a 64-bit application. I got one response that said I should try to create a WCF Service over named ...
Happlo's user avatar
  • 131
1 vote
3 answers
1k views

WCF service and database

I have a WCF service that work with databse. The service should handle incoming message and store messagId into database. Please suggest me how can I improve it? ...
Roman Marusyk's user avatar
-1 votes
1 answer
2k views

WCF generic proxy caller

I have an ASP.NET web-client and many WCF services. I used it this way: ...
Yeldar Kurmangaliyev's user avatar
1 vote
1 answer
4k views

A more optimized / cleaner way of validating WCF input parameter using IParameterInspector

I'm having a WCF Rest service which does input parameter validation by using the IParameterInspector, before calling the actual service method. I have Implemented ...
Krishnraj Rana's user avatar
3 votes
1 answer
2k views

Wrapper classes for objects returned by 3rd party APIs

I am building a WPF application which uses a third party library to fetch objects which I want to allow the user to interact with. The objects are returned as interface types. Am I right in thinking ...
Tiggy's user avatar
  • 51
0 votes
2 answers
854 views

Questionnaire design puzzle

I am designing a small questionnaire web service application but however I would like if someone can look at my design and see if it good approach I am taking. The application has the following ...
Milas's user avatar
  • 101
8 votes
1 answer
1k views

WCF Duplex service authentication

I have been thinking about a way to implement this and I am not sure that what I have done is correct, because it surely sounds kinda dirty to me. Basically what I have is a WCF duplex service which ...
Phoenix's user avatar
  • 470
54 votes
2 answers
87k views

Single instance of reusable HttpClient

I've got this method and I realize that an instance of HttpClass is going to be created for each call to it. While working seemingly OK, I'm considering moving it ...
Konrad Viltersten's user avatar
2 votes
1 answer
733 views

This brittle OData to SQL Server C# code isn't sustainable over time

The intent of this code is to access a third party OData API to capture only the relevant data to an existing in-house set of MSSQL server tables. Ignore the exception handling for now--the errors ...
plditallo's user avatar
  • 251
4 votes
2 answers
265 views

WCF service implementation

I have WCF Service using .NET 4.0. I have similar methods, similar code and I want use good patterns for improvement the code for get high level quality. I want reuse code, maybe using ...
Kiquenet's user avatar
  • 261
3 votes
2 answers
3k views

Implementing WCF method that supports either string or object as a method parameter

I have the following contract in a WCF-based web service: public List<string> GetAllPossibleQueryEngineHostNames(Instance instance); Obviously, I can call ...
Mike Christensen's user avatar
3 votes
1 answer
960 views

Proper way of mapping in C#

I have a WCF service that itself uses another third party WCF service. It's basically a proxy. So I'm getting a request to my own one and I have just to "forward" it to the third party one. I would ...
mitomed's user avatar
  • 539
5 votes
1 answer
3k views

.NET WCF Activator for sync and async calls

I decided to re-write my code responsible for WCF calls, as all of my methods had try-catch-...
303's user avatar
  • 163
1 vote
1 answer
2k views

Concept for saving context information

My Problem I have a library containing business logic which is being used from 3 different projects: Website Local WPF Application WCF Service The library uses Entity Framework and a connection ...
user30345's user avatar
4 votes
1 answer
2k views

Using XDocument properly

I have a WCF service in which I am reading and adding some records to a .xml file. I load the .xml document in the constructor and use it in all the methods and save when it's updated. I want to ...
TRS's user avatar
  • 143
3 votes
1 answer
3k views

Call to external web service

The architecture is showing a call to an external Web Service which is called by me. Then I will expose the data using WCF to be callable from another WCF client. But I really don't like how it's done....
Revious's user avatar
  • 503
7 votes
3 answers
14k views

Consistent way to handle transient timeouts with WCF calls (timeouts, unreliable network, server load, etc)

I'm currently using the following code to manage calls to WCF services that are unreliable, and or suffer performance load issues due to contention. Right now this code is limited to solving issue ...
makerofthings7's user avatar
1 vote
2 answers
970 views

Exposing WCF Service with dynamic search operation

I have this WCF service providing search functionality - to be used by our client in his web application. There can be any number of search parameters and possible nesting of ...
user1552869's user avatar
4 votes
1 answer
6k views

Thread-safe wrapper around WCF ServiceModel.ClientBase subclass

I have an ASP.NET application which uses a Service Reference to a (third-party, offsite) payment processor. The service reference class is generated automatically. Its implementation is a subclass of ...
ChrisW's user avatar
  • 12.9k
2 votes
1 answer
1k views

Avoiding Duplicate Boilerplate Code in WCF Service

I'm responsible for maintaining a web service project in c#. I have one service class with a bunch of methods that look a lot like this: ...
Brian's user avatar
  • 433
8 votes
3 answers
12k views

Make WCF Service testable

I have WCF Service. It works fine and I want to have test coverage for it. Unit tests and acceptance. The problem is the static class in the code. How is it ...
MikroDel's user avatar
  • 405
1 vote
1 answer
610 views

Simple WCF messaging system via EF

I'm open to any comments on this code/approach. This is mostly architecture and threading. ...
Chris Hayes's user avatar
9 votes
1 answer
2k views

WCF using TAP without worrying about timeouts

I really like using the new TAP pattern in .Net 4.5. and I am updating some of my older projects to use it. One of my old patterns was to use EAP with WCF so I could have functions that could take ...
Scott Chamberlain's user avatar
1 vote
1 answer
373 views

How to write a stable WCF service

I'm writing a WCF service for validating password and getting company ID for the clients that requests the services. The service runs on a server locally as a windows service, which sends queries to ...
TtT23's user avatar
  • 1,040
14 votes
2 answers
51k views

Using a WCF service client and handling its exceptions

I am new to WCF and need to work with another programmer's code. I am unsure of the way the WCF service client is used here: ...
user avatar
5 votes
1 answer
6k views

Allowing a client and server to communicate with a DDC

I'm designing a client (UI made with WPF) and server (WCF) that communicates with a device known as DDC (Direct Digital Control). A user on the client side can make requests to adjust the state of the ...
TtT23's user avatar
  • 1,040
3 votes
1 answer
2k views

caching in WCF web service

I want to realize caching in WCF web service. I'm using the following code: ...
user348173's user avatar
0 votes
1 answer
4k views

Self-hosting WCF in Windows Forms without another Windows process [closed]

I have a Windows application and want to self-host a WCF in it. This MSDN article walks you through how to self-host WCF in a console. Jason Henderson's article demonstrates how to call the service. ...
walterhuang's user avatar
3 votes
2 answers
7k views

WCF wrapper implementing dispose-finalize pattern

I tried to implement the dispose-finalize pattern on this WCF wrapper. Do you have any comments about this? Something I missed? ...
Gil's user avatar
  • 41
3 votes
1 answer
8k views

How to improve WCF client proxy based on CreateChannel (not generated from WSDL) in C#

When invoking a Web Service from C# (where the external service might be WCF, ASMX, Java, etc. - you just don't know), it is common practice to point your modern development tool of choice (Visual ...
codingoutloud's user avatar
4 votes
2 answers
1k views

Is this a good way to handle Web API UriTemplates?

I want to be able to do /contacts/Matt%20Phillips and /contacts/1 and have both of them return a contact. The way I did that was ...
Matt Phillips's user avatar
2 votes
1 answer
942 views

WCF general response validation for multiple services

Background information I am building a web application that consumes 3 different WCF services that are hosted internally. Each response object from the service inherits from a base class ...
Peter's user avatar
  • 407