wcf

How to store header info in a custom WCF HTTP binding

Hi there, Basically, I want to get HTTP requests from a different source than a listening socket. However, since the provided bindings don't offer support for this, I am currently building my own binding. My current binding consists of the WebMessageEncoder and of a custom TransportBindingElement, which references a custom ChannelListe...

What is the syntax that should be used for WebMessageBodyStyle.Wrapped?

I can't find any documentation on the syntax for a HttpWebRequest wrapped body. ...

Cross-network WCF service authentication - What's the best way to do it?

Hi! I have a WCF service that's hosted at a commerical hosting facility that I need to authenticate against Active Directory on my corporate network. I should mention that there is no way to setup an AD-Trust between the two networks. Also, my corproate IT department sucks so any solution will likely need to be crafted and/or implem...

FaultException handling in BizTalk

The FaultContract from my WCF service doesn't have a datacontract members; thus when the service is consumed in BizTalk, the generated schema doesn't show up any members. How do I handle in BizTalk? While consuming this WCF service from a .NET client, the implementation provides the exception along with Class library ( of data objects) ...

Stubborn object won't serialize with protobuf-net

I'm integrating protobuf-net into our WCF services based solution but have ran into a snag that I can't figure out. The following class will serialize fine, all except for the ObjectId property. /// <summary> /// A service data object that represents a user of the system. /// </summary> [DataContract(Namespace = "http://LINKS.Service.S...

WCF restful service error while consuming the service.

I have WCF restful service and have property called Image with Imageclass [DataMember] public Image Image { get; set; } and getting the below error when trying to call the method having a object with above property System.Runtime.Serialization.SerializationException: Type 'System.Drawing.Bitmap' with data contract name 'Bitmap:http:/...

Impersonate FormsAuthenticated user in HttpHandler for WCF call

I'm using HttpHandlers to generate PDF report files "on-the-fly" using the authenticated user context. However, to create the report PDF file I need to call a method on a secure WCF service with the context of the caller (the authenticated user). I saw plenty of answers for the Windows authentication but I'm using plain old Forms authen...

Will upgrading to Server 2008 R2 increase performance?

We are deploying two server-based applications, one WCF, and one a Winform that processes a lot of network traffic (like a custom-made WCF). Generally speaking, would upgrading from Server 2008 to Server 2008 R2 / IIS 7.5 offer these apps potential significant performance benefits? I'm particularly interested, as I've heard great thi...

Error with VS2008 trying to debug WCF service

Pulled down an old revision of a project from subversion, made some changes, and rebuilt it. Now VS2008 errors out when i try to debug it with this error: It doesnt even hit my service ctor, and it indicates a invalid configuration file, but its the same when comparing against my current revision. Anyone seen an error like this? Al...

Recovering from a CommunicationObjectFaultedException in WCF

I have a client app that tries every 10 seconds to send a message over a WCF web service. This client app will be on a computer on board a ship, which we know will have spotty internet connectivity. I would like for the app to try to send data via the service, and if it can't, to queue up the messages until it can send them through the...

Find Endpoint addresses for a service implementation without OperationContext.Current

I have a WCF service in which I would like to do some initialization-type operations based on the configured EndpointAddresses for a few different contracts implemented by the service. The service can be (and is) hosted from within a few different Service Hosts. There is a console application which creates a service host, a windows ser...

WCF Service hangs and clients receive a ServiceModel.CommunicationException

My application has 50 service endpoints (such as /mysite/myService.svc). It's hosted in IIS. Intermittently (once every two or three days) a service stops responding. It's never the same service that hangs. While a service is hung, some of the other services work fine and some other are also hung. All clients (from different computers) ...

WCF PerCall instance server and Dependency Injection using Prism?

If I have a client/server type of application built using both Prism and WCF, and I would like on the serverside to have the wcf service to be instatiated per call BUT I would like to use dependency injection (using the UnityContainer in Prism). How could I possibly do this? Should I have a single instance service it would be no problem,...

Passing IList<T> vs. IEnumerable<T> with protobuf-net

I noticed in the protobuf-net changelog that IList<> was supported but I'm getting the "Cannot create an instance of an interface" exception. If I change to IEnumerable<> then life is good. Does this sound correct? // Client call public override IList<IApplicationWorkflow> Execute(IRoleManagement service) { IList<A...

WCF : Is inactivityTimeout effective when reliableSession enabled="false"

If I have this configuration: <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> Is the inactivityTimeout effective (even if reliableSession is not enabled)? EDIT : If is not effective, can you control inactivity timeout elsewhere? Thanks ...

Consuming a RESTful JSON API using WCF

I'm new to WCF (and pretty rusty with .NET in general) so there's a distinct chance this is an answered question and I just missed it. I'm building an ASP.NET MVC app that will be using a RESTful JSON-based API for its backend. I've been looking into the different options for how to talk to such an API in .NET and it looks like WCF is t...

EndpointNotFoundException and Async Calls

Is it possible to catch an EndpointNotFoundException when calling an asynchronous method in WCF? I've wrapped the service call on my client in a try / catch block, and am catching EndpointNotFoundExceptions, FaultExceptions and general Exceptions, but if the service disappears once the client is running, no exception is caught on the as...

WCF security problem

Hi there, I have an app that accesses a WCF service on a server which is hosted in a console app. I don't have a problem there, it's when I try access another service from the console app that's on yet another server that i have the problem. I'm using TCP to connect and i'm using all the default security values. So i'm going from A->B...

MVVM & WCF - View Model and Model Relationship

I am not understanding how my model can be a WCF service. It makes sense when its an Astoria partial class residing on the client that allows remote calls to do persistence calls, but a WCF service doesn't have properties for model fields that can be used to update a data store. Even if I could factor out an interface for a model/dom...

strange WCF client side app.config generated

Hello everyone, I am referring from VSTS2008 (C# console application, using .Net 3.5) by using Add Service Reference function to add reference to a WCF service hosted in IIS 7.0 in another machine in the same LAN. I find the client side app.config generated automatically is very strange. Here is the content, My confusion is the end poi...