wcf

Interview questions: WCF

What should every WCF developer know ? Entry Level What WCF stands for (Gary) Define the ABCs of WCF -- address, binding, contract. (D Hoerster) Mid Level Senior ...

RequestInterceptor in WCF 4.0 REST Service Application

I have a WCF 4.0 REST service Application that I would like to intercept an incoming request and check a custom header. In my solution I am using the following default endpoint <standardEndpoints> <webHttpEndpoint> <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" /> </webHttpEndpoint> </stan...

WCF Security and config help - base address for https not found

Hi All, I'm getting this error in my event log for a Windows hosted service. Service cannot be started. System.InvalidOperationException: Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are [http]. This service has always worked unt...

Specify the outgoing IP address to use with WCF client

How to define the LocalEndPoint to use by a WCF client when calling a WCF service (if the client machine has multiple IP addresses) ? I have a machine located in a DMZ with two IP addresses, the external IP address can be reached through the firewall via a VPN connection from our webserver, located at an external service provider. On th...

WCF can have server and clients running different framework versions (2.0 & 4.0)(c# 3.5 and c# 4.0)

WCF can have server and clients running different framework versions (2.0 & 4.0)(c# 3.5 and c# 4.0)? I have a server alreary running WCF and several clients, I am modifing the server side adding new funcionality but recompiling for the new framework (4.0), the code part for the WCF was not changed , do I need to also recompile and...

OData or REST WCF toolkit for Visual Studio 2008?

I tried to create a OData web service using VS 2008 without any luck. I downloaded ODataDemo from Odata.org, installed Microsoft .NET Framework 3.5 Service Pack 1, and ADO.NET Data Services Update for .NET Framework 3.5 for Windows XP. However, I don't see any reference to ADO.NET Data Services Framework. When I tried to add a new ADO.Ne...

Can I use EF with POCO adapter without database operations?

I understand that EF is tightly mapped against database. I also understand that we can generate POCO classes replacing EF based classes. I have the following scenario. We have a large framework of legacy non-serializable API written in .NET framework 2.0 (and we cannot modify that). We will not have direct access to database and all ...

C#: WCF: Interface inheritance and casting question

I am writing the client side for a WCF service that supports both synchronous and asynchronous calls without having to implement 5-6 different methods in channel for each method in the contract. I have a base interface (IServiceClient) and a generic class based on this interface type (ServiceClient) as follows: public interface IServic...

Does the client proxy internally sends its address to the server when making a call ?

We have a WCF service , with ABC as 'Server_abc' Now , we created a proxy on the client side and made a call on the server. My understanding is that the poxy will have the 'Server_abc' of server and make a connection internally and exucute the code. The Question is Does the poxy create a hidden service on the client side and send the ...

WCF Duplex timeout problem

Hi, I've been searching the web for the last two days, but by no means, I can get my WCF Duplex service working. I've created a demo project which can be download from skydrive: WCFDuplexDemo.zip For the purpose of minimizing the number of possible error causes, I've decided to just return a short string in the callback handler becaus...

Debugging WCF service hosted in IIS 6.0 using Visual Studio 2005

Hello all I've created a WCF service selecting 'WCF Service' in installed web site templates in VS2005. I've added a ASP.Net client for the service in the SAME solution. I published the WCF service in IIS 6.0 and configured it to run in .Net Framework 2.0. I did an IISAPP in command prompt and identified the PID of the w3wp.exe process...

Error After Migrating from .NET3.5 to .NET4.0

I have a test declared as: [Test] [ExpectedException(typeof(FaultException<ArgumentException>))] public void ShouldNotBeAbleToDeleteASystemList() When I run this in VS2008 targeting .net 3.5 it all works fine and the test passes as the exception is thrown. I have migrated the solution to VS2010 and changed the target fram...

WCF: wrapping legacy API question

I have to wrap legacy .net assembly API (set of classes and interfaces) with WCF service. Service is visioned as proxy that delegates calls to existing classes with virtually no additional work. So I addded [ServiceContract] interface that exposes methods that deals with existing structures and classes. But wcf-proxy-generator (svcutil...

wcf client ip as ipv6

Hello. i'm using next piece of code to get client ip on wcf service : OperationContext context = OperationContext.Current; System.ServiceModel.Channels.MessageProperties prop = context.IncomingMessageProperties; System.ServiceModel.Channels.RemoteEndpointMessageProperty endpoint = prop[System.ServiceModel.Channe...

Read Excel from Silverlight and Process it in WCF Service in C#

Hello, I want to read the contents of Excel file from local disk using Silverlight and want to pass the data to WCF service. The service will then select the data from the worksheet and put it into database. I want to know which data type shall i use to pass the Excel object to WCF Service? Thanks in advance. ...

Instance, Session and Concurrency for duplex service

I have a requirement where a service should be sending a message to client every second. There can be only one client to the service. I have a created a duplex service and now confused on instance, concurrency and session for the service. Is session always required for a duplex service? SessionMode.Required Does the InstanceContextM...

Creating a custom STS-IP with WIF and why not

I have a need to implement a STS-IP server for our web applications and services. The server will need to issue SAML tokens for the following scenarios: Business partner submits their SAML token which is converted to a SAML token with the claims required for our applications. This token is used to access our Web Applications and Serv...

WCF Web Service and Data Service using SAML

I have WinForms and ASP.Net applications that need to access WCF Web and Data services using a SAML token. I've been looking at Windows Identity Foundation (WIF) to enable the WCF service to use SAML tokens from an STS-IP. On the client, do I make a call to the STS and get a SAML token, then pass the token to the WCF service? if so, h...

adding custom namespace in Soap Envelope in WCF

Hi, we are calling POX (java) webservice from .NET code using Channel.Request method. we need to add custom namespace "xmlns:ser="http://services.billing.pl.XXX.com" in the Soap envelop message. Could you please let me know how to add this namespace in Soap envelope. We need add the namespace xmlns:ser="http://services.billing.pl.XXX.co...

How to save encrypted and signed messages in WCF for audit

We are building a highly sensitive system, you can think of it as a banking system, where you have a client with a certificate that calls a WCF service to send a transaction to the server. staying in the example of the banking system, that transaction can be a wire order or a debit. So for audit and in case of litigation by the client ...