wcf

Can I find out what WCF methods are supported on the endpoint before calling it?

I have a versioning issue with a WCF service contract in which one of the many endpoints which are called for the operation is missing one method from the contract. My question is, how can I make sure the command is available on the client before attempting to call it? I tried: foreach (var od in proxy.Endpoint.Contract.Operations) ...

OperationContext.Current is null and all other contexts too

I have a WCF service defined as following: [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] [ServiceBehavior(IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.PerCall)] public partial class FrontEndService : IFrontEndService However, most of the time (but ...

WCF REST Question, Binding, Configuration

I am working on a WCF rest interface using json. I have wrapped the service in a windows service to host the service but I am now having trouble getting the service to be callable. I am not sure exactly what is wrong. The basic idea is that I want to host the service on a remote server so I want the service mapped to port localhost:76...

Shared classes are build under VS2008 only but not under MSBuild.

We share our classes between silverlight 3.0 client and server as is it described here. Everything works fine under Visual Studio 2008 only. Using msbuild with following command line parameters: C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe FoobarApplication.sln /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU" we get fo...

WCF doesn't find client configuration

Hi ! I have a WCF service on server B. Then on the machine A is the client, which is a Windows service. In a separate dll stands all the business logic for this service. So my proxy for the WCF is on that side. I have 2 app.config (client side only) : 1 for the service and another one in the dll. So I tried (for test purpose) puting the...

WCF how detect client existency

Hi all, As writen in my title, background: I have 2 different type of applications (WPF-silverlight) which can talk each other - Doctor application and Patient application - but it doesn't mean only 2 apps will run, for instance: i can run 3 doctor app and 7 patient app. and all of those apps is communicate using wcf via tcp connection...

can i use a generic list in a WCF called from silverlight?

Hi, when i return a generic List of my custom object in a wcf service, silverlight gives me this error when i update my service reference (and the reference.cs file is completely blank) ugly ones like this: Warning 18 Custom tool warning: Cannot import wsdl:binding Detail: There was an error importing a wsdl:portType that the wsdl:bi...

CommunicationException in WCF

Hi I have a problem with a WCF Service I've just created. This was working yesterday but for some reason it's just stopped working. One of my WCF methods returns an array of an Entity Framework entity, like this: public BranchContactDetail[] GetClosestBranches(string postcode, int howManyBranches) { GeoLocation geoLoca...

Is there an example of checking on if a WCF Service is online?

I will have a client application using a proxy to a WCF Service. This client will be a windows form application doing basicHttpBinding to N number of endpoints at an address. The problem I want to resolve is that when any windows form application going across the internet to get my web server that must have my web server online will ne...

First Time Architecturing?

I was recently given the task of rebuilding an existing RIA. The new RIA that I've designed is based on Silverlight, with a WCF service to connect to MS SQL Server. This is my first time doing something like this, so I'm not sure how to design the entire thing. Basically, the client can look through graphs of "stocks" (allowing the cl...

WinService hosted WCF + PHP client, and disabled service

Hi, I have implemented a WCF service hosted on Windows Service. I want to consume it with PHP. Everything works OK for now, but problem is when I stop my win. service. Consuming it with .NET application I get EndpointNotFoundException. But using PHP I get HTTP Error 500.0 - Internal Server Error This is my PHP code: <?php header('Con...

HTTP 404 Error manifests itself as EndPointNotFoundException on a WCF client

How can I make my client treat 404 Error correctly? Right now it catches a general exception... My WCF Server uses WebOperationContext.Current.OutgoingResponse.SetStatusAsNotFound(); To return a 404 Error code however my WCF client interperts it as an EndPointNotFoundException There was no endpoint listening at http://myUrl that cou...

WCF REST Starter Kit not filling base class members on POST

I have a WCF REST Starter Kit service. The type handled by the service is a subclass of a base class. For POST requests, the base class members are not correctly populated. The class hierarchy looks like this: [DataContract] public class BaseTreeItem { [DataMember] public String Id { get; set; } [DataMember] public St...

WCF - Compact Framework - Pull data from mobile client

Hello guys, I want to communicate xml serialized objects from the server to the client and the other way arround. Now it is (probably) easy to invoke methods from a mobile client (compact framework) using WCF, but is there a way so that the server can invoke methods on the client side or some other way to pull data from the client? I kno...

How to define a batching routing service in WCF

I have designed a custom silverlight wcf channel that I want to leverage to selectively batch calls from the client to the server and possibly to cache on the client and short circuit calls. So far I'm just using this channel as a transport and sending the generic WCF messages that result to the WCF router service example here http://...

WCF RIA Services and a Persistent Thread.

My services work on data from a database as well as a long running thread that runs during the lifetime of all other service. I need help with which way to implementing this. I can use the DomainService factory and a constructor to start the long running thread. The other choice is to have the long running thread as a separate servic...

Logging exceptions in WCF with IErrorHandler inside HandleError or ProvideFault?

I'm using IErrorHandler to do exception handling in WCF and now I want to log the exceptions, along with the stack trace and the user that caused the exception. The only way I can see to get the user that caused the exception is: OperationContext.Current.IncomingMessageProperties.Security.ServiceSecurityContext.PrimaryIdentity ...But ...

Best WCF config based on scenario

Hello, Please recommend best approach (bindings, encoding, transport, etc) based on the following WCF scenario and requirements: Both client and service are WCF 3.5 based. Client and service will communicate thru Internet over SSL port 443. WCF Client (a Windows Service) is on w2kx server behind firewall/NAT. Client will initiate ...

How do I get the XML data that went down the wire from a WCF Service generated from `Add Service Reference`

Assume I have code like this: var svc = new Namespace.SvcClient(); var request = new Namespace.SvcRequest(); request.SomeProperty = "Value1"; request.SomeProperty = 4.0d; var response = svc.Request(request); SetText(response.Result.ToString()); svc.Close(); What I want to have is the actual XML that got sent out as the result of svc.R...

How do you identify authentcated user in WCF?

I have a WCF service that will be using basic authentication and would like to be able identify "who" is trying to use the service. I know that the HttpContext.Current is NULL and in the WCF service, but do not know what the alternative is to get the username. For the website, I can use: userName = HttpContext.Current.Request.Server...