wcf

WCF Web service method advice

I've been tasked with implementing a web service method that can be used for many different things(read: no requirements exist) and any client's won't have to change the interface Here's what the method is supposed to look like [DataContract] public class Status { [DataMember(Order = 0)] public long Code ...

WCF Web Service, cross-domain example.

Can anyone point me to a good/simple example of creating a WCF web-service sitting on one website, followed with a simple example consuming that WCF web-service on another website? ...

Implementing subscriber / publisher system with MSMQ with dynamic endpoints

I'm trying to create a feedback system which all messages get posted to then published back to the correct subsystem. We are using queues quiet heavily and i want to make the subscriber code as clean as possible. I want to switch based off the message id i get into the feedback system and publish to its specific subscriber. i don't want ...

How to pass WCF UserName clientCredentialType to other service?

Hi, I have several WCF services hosted in IIS6 (should not affect this issue) on the same host, and I want, for Performance/ Maintanance and other reasons to combine several requests into 1 request using a Facade Service, All done with special Service Contract / Service that has an operation that calls other services for several operati...

How do you configure WCF known types programmatically?

My client/server application is using WCF for communication, which has been great. However one shortcoming of the current architecture is that I must use known type configuration for certain transmitted types. I'm using an in-house Pub/Sub mechanism and this requirement is unavoidable. The problem is that it's easy to forget to add th...

How to read app.config from a custom location, i.e. from a database in .NET

I am trying to override the ApplyConfiguration method in my custom ServiceHost to read the configuration from a database instead of app.config. Ideally I would want to be able to do something like this: Configuration config = GetConfigFromMyDatabase(...); ServiceModelSectionGroup serviceModel = ServiceModelSectionGroup.GetSectionGroup(...

Does adding an operation to a WCF Service contract nessecerly means that all WCF client should update their references?

I'll be more specific. Lets say I have a contract defined for my WCF service. And I have two different WCF clients which reference to this service : "ClientA" and "ClientB". Now , lets say I want to add an operation (method) to my service which only "ClientB" will use , Lets say I added this operation to the contract and "ClientB" upda...

Where to place language translations in an multitiered architecture

I build an app with following layers: WEB presentation layer Business Logic Layer - BLL - called from WEB UI through HTTP web services WindowsService - Runtime - called from BLL through net.pipe BLL can also be called from 3rd party for integration into other customer's systems. Let's say that there is an validation error that happ...

WCF Redirect

I know that WCF is supposed to be transport agnostic, but is there a method to write directly to the client (web client esp.)? I need to do the equivalent of response.redirect(url) and though it might be possible to just write out a "301 Location Moved" header. I am trying to write a service that would move static content to a CDN (S3 ...

How do I expose interfaces Property via WCF in VB.NET?

In C# I can do this to expose a property via WCF [ServiceContractAttribute()] public interface IFoo { int Length { [OperationContract()] get; [OperationContract()] set; } } I have to do it that way since OperationContract decorates a method but not a property. I'm working with a legacy interface that I can't easily chan...

SOAP Header with identity of final client

The environment is in-house service based applications running in a Windows environment with WCF. There are several "middle-tier" ASP.NET Web Applications and Web Services that authenticate the final client using Windows authentication, and use ASP.NET Roles to set Thread.CurrentPrincipal to a suitable RolePrincipal. These application...

Jumping into N-Tier architecture with WCF?

I work for a large state government agency that is a tad behind the times. Our skill sets are outdated and budgetary freezes prevent any training or hiring of new employees/consultants (firing people is also impossible). Designing business objects, implementing design patterns, establishing code libraries and services, unit testing, so...

C#: WCF Method not found after signing an assembly

I have a 3 projects in a solution like such: WCF Service: Hosts a couple of methods Class Library: Acts as a gateway to the WCF service by returning an instance of its Soap client WPF Application: Consumes the service methods via the referenced class library Everything was working perfectly...the application was accessing an instance...

Need sample fire and forget async call to WCF service

On a scheduled interval I need to call a WCF service call another WCF Service asyncronously. Scheduling a call to a WCF service I have worked out. What I think I need and I have read about here on stackoverflow that it is necessary to.., (in essence) prepare or change the code of your WCF services as to be able to handle an async call ...

How to generate xs:Date in WCF OperationContract parameter

For parameters to an OperationContract that represent a date only (no time component or timezone designator), it is desirable to use xs:Date, to avoid any ambiguity or problems with timezone conversion between client and server. WCF currently only supports xs:DateTime for serializing DateTime parameters. What is the easiest way to gene...

Resolve CLR Type from DataContract.Namespace?

Hello, I'm a newbie whitebelt with WCF. I have a namespace: http://schemas.datacontract.org/2004/07/System/ArgumentException. I'm looking to take that string and convert it into a CLR type so that I end up with typeof(ArgumentException). Is this possible? :) Thank you, MichaelD ...

wcf guaranteed asynchronous call

Is there a way to configure WCF to do guaranteed asynchronous calls (remotely - on different machine)? I.e. something you would implement using some MQ messaging mechanism before WCF era. ...

Authenticate a Client connecting to a web service

Hello, I have a WCF web service. This web service should only allow certain client applications (built with technologies like Silverlight, Flex, ClickOnce, etc) to execute it's functionality. In an attempt to accomplish this, I have started each publicly visible method with the following code: if (IsClientValid(...) == false) return;...

wsFederationHttpBinding, passing custom user Identity to STS

I'm trying to implement following scenario: Client passes it's cridentials to STS. STS applies custom AuthorizationPolicy to determine set of claims available to particular user and issues a secure token. Client passes the token to business services which determine user's priveleges basing on the set of claims they got from the token. ...

WCF service using duplex channel in different domains

I have a WCF service and a Windows client. They communicate via a Duplex WCF channel which when I run from within a single network domain runs fine, but when I put the server on a separate network domain I get the following message in the WCF server trace... The message with to 'net.tcp://abc:8731/ActiveAreaService/mex/mex' canno...