wcf

What are the steps to setup SSL to work with WCF on Azure?

Please post the steps you have taken to setup SSL to work with WCF on Azure. I have my valid certificate uploaded successfully (using cspack) and working with the rest of the site, but after adding it, my previously working WCF service stopped working. (All I get is a 404 error back to Silverlight, which is not very helpful. Up votes ...

How to use interception with WCF and Unity

I have a WCF service that is setup to be hosted within a unity container. I was intending to use this container to perform method interception. The only issue is I can get my interceptor to fire... first here the def of my interceptor attribute and handler [AttributeUsage(AttributeTargets.Method)] public class PCSecurityAttribute : H...

Collection was modified; enumeration operation may not execute.

I can't get to the bottom of this error, because when the debugger is attached, it does not seem to occur. Below is the code. This is a WCF server in a Windows service. The method NotifySubscribers is called by the service whenever there is a data event (at random intervals, but not very often - about 800 times per day). When a Windows...

Is it possible to serialize objects without a parameterless constructor in WCF?

I know that a private parameterless constructor works but what about an object with no parameterless constructors? I would like to expose types from a third party library so I have no control over the type definitions. If there is a way what is the easiest? E.g. I don't what to have to create a sub type. Edit: What I'm looking for is...

Can a windows hosted WCF service use HTTPS?

I have a WCF service that is using webHttpBinding on an endpoint, and the WCF service is hosted as a windows service. Is it possible to secure this at the transport level by using HTTPS or some other method? ...

RESTful WCF service that can respond in both JSON(P) and XML and still be used as SOAP web service?

Given a contract such as: [ServiceContract] public interface IService { [OperationContract] [WebGet(UriTemplate = "GetData/{id}.{format}")] ResponseData GetData(string id, string format); } Is there a way to get the service to respond with json when requested as: /GetData/1234.json, xml when requested as /GetData/1234.xml ...

Pros/Cons of Binary Reference VS WCF

I am in the process of implementing an enhancement to an existing web application(A). The new solution will provide features(charts/images/data) to the application A. The new enhancement will be a new project and will generate new assemblies. I am trying to identify what would be most elegant way to read this information. 1) Do a binary ...

entity framework/WCF connection order

Getting some weird behavior in a system. Here's what's up: I have a main which sets up server endpoints using WCF before opening the channels for read/write. I also have an entity-framework based database abstraction layer. When I instantiate my DataBase class, I connect to the DB. One of my endpoints contains this DB abstraction ...

WCF Service Deployment - Where Are the Application Files Kept?

I have a WCF service that calls, through a BL, a Data Layer and ultimately SQL Server back-end. My service exposes various methods/operations to get data out of the database. I have also built a host for it for testing, and a Windows Service Host, which is how I plan to deploy it. Yesterday when I did a test-deploy, the service starte...

Where goes WCF binding configuration?

I was checking out streaming in the Programming WCF Services book, and I spotted a line about configurating. You will need to configure the binding on the client or service side (or both) per required stream mode So what is this? How I know where I should configure them? And is this a common thing with WCF? Seems bit weird to me....

getting System.ServiceModel.AddressAccessDeniedException on Vista for WCF service

We have an application that starts a WCF server and the app reads from it. It starts and can be read fine on all Windows XP machines. On our Vista machine, however, we get: System.ServiceModel.AddressAccessDeniedException "The process has no rights to this namespace." System.Net.HttpListenerException The URL is at localhost: http:/...

Some questions about transfering file using WCF

Hi, I have a WCF service that is hosted on a Windows Service. Now I want to add file transfer functionality to this service but I have the following questions; considering that transferring files are both ways and files are not big (around 10MB): 1: I have read in MSDN that "Operations that occur across a streamed transport can have a c...

How Do You Add a ServiceReference When the Service Does not expose Meta Data?

This is a follow up to this post on passing messages between two programs running on the same machine. I am trying to use Named Pipes but when I try and expose the Meta data I get a rights issue error saying HTTP could not register URL http://+:/8011/Local/Mex. I do not need to expose MetaData as this is a very simple service that is ...

Why is WCF so important and in what cases is it used

I understand to an extent that it helps applications communicate regardless of their location. Can some please shed some more light and give an example of a real world use of WCF? Thanks guys ...

WCF and Firewall

I have written a very simple WCF service (hosted in IIS) and web application that talks to it. If they are both in the same domain, it works fine. But when I put them in different domains (on different sides of a firewall), then the web applications says: The request for security token could not be satisfied because authentication fai...

WCF Server without config file

I'm tired of dealing with config files so I'm trying to setup a WCF service in code only. So far I have this: m_ServiceHost = New ServiceHost(Me) m_ServiceHost.AddServiceEndpoint( GetType(Aam.AamServiceFramework.IServiceMonitor), New NetTcpBinding, "net.tcp://localhost:6000) m_ServiceHost.AddServiceEnd...

WCF Custom ServiceHost Cleanup in IIS

I have a custom WCF ServiceHost that opens a persistent object to an external resource. The operations on the contract are then wired on to this persistent object. The persistent object manages itself to ensure it's always in a usable state. I'm having a difficult time deciding where it is safe to dispose this object -- because once it'...

adding custom SOAP headers in MEX response for operation contract based WCF services

I'm having a problem consuming WCF service requiring custom SOAP headers for methods marked with [OperationContract] attributes. Custom headers cannot be explicitly declared in the service because interface methods are not based on [MessageContract]. As a result When svcutil.exe tries to build client proxies the resulting generated code ...

WCF: How do I get the list of endpoints from ServiceHost?

I can add endpoints using ServiceHost.AddServiceEndpoint. How do I get that list of endpoints back out? ...

How i can get the username from a WCF AuthenticationService?

Hi, how i can get the logged in user name when the result of AuthenticationService.isLoggedIn() is true? thank ...