wcf

WCF contract returning interface could cause serialization issue?

I am trying to define a WCF contract that returns an interface, something like below: [ServiceContract] public interface IMyContracts { [OperationContract] IMyInterface GetData(string request); } To get this to work I think my interface (IMyInterface) would have to implement ISerializable to ensure classes implementing my inte...

How do you determine the values in a binding?

I have defined a binding that I use to connect to two different services. One I call my Master service that provides configuration information to my program and tells it which Local service to connect to. The Local service returns, along with other things, items that allow me to draw map lines and an MP3 as a file stream. The MP3 can...

What is the best way to return errors from a WCF service in a RESTful way?

Using WCF in a RESTful way seems great. I’m a big fan of the big guns like simplicity and flexibility, but I also love the way the Urls end up looking. What can I say, I’m a programmer. The simple API for retrieving and editing resources is matched by an almost equally simple set of possible error responses, and I can’t help feeling tha...

VS2008 Crashes when adding a WCF service.

Hi guys, I have a Console application hosting a WCF service: Updated this code to run off the app.config file instead of initialising it programatically Uri baseAddress = new Uri("http://localhost:8000/ChatServer/Service"); ServiceHost myHost = new ServiceHost(typeof(ClientServerChat.ChatServer), baseAddress); myHo...

What type of service should I use for Silverlight 2 data?

There is ASMX, WCF, REST, and ADO.NET Data Services... I've used WCF and ASMX succesfully with Silverlight 2, but what about the others? What are the pros and cons of using each type of service with Silverlight 2? ...

Benefits & pitfalls of moving to IIS 7, Windows Server 2008 for WCF Services

We're currently using IIS 6 and Windows Server 2003 for our web and application servers. Our web servers make WCF Service calls to our application servers. We'd like to move to IIS 7 and Windows Server 2008 so that we can use the recommended netTcpBinding (at the moment we're using a basicHttpBinding). (along with this we'd also move f...

WCF: is it possible to use streaming mode in a duplex channel?

In WCF, contracts can be switched to streaming mode, to transfer large messages. After reading and testing it seems to me, that streaming mode can not be used with duplex channels (channels with OneWay-calls and a callback interface). Is this so? Do duplex and streaming can not be used with each other? Or is there a way? (I'm trying t...

Model - View - ViewModel & WCF - is WCF the model?

I'm just learning the Model / View / ViewModel pattern and it's variations (DataModel / View / ViewModel, or Model / View / Presenter). What I wonder is: if I use this pattern with a WCF service, is the service the Model (DataModel), or do I need a separate Model to encapsulate the WCF service layer?? When I use WCF as DataModel my Vie...

Creating WCF Services

Can a class have a "Service Contract" attribute and its methods "Operation Contract". Or do these need to be applied to an interface which the class would have to implement? ...

Understanding WCF

Could anyone point me to a resource that explains WCF with pictures and simple code snippets. I am tired of googling and finding the same "ABC" articles in all search results. ...

WCF and Multiple Host Headers

My employers website has multiple hostnames that all hit the same server and we just show different skins for branding purposes. Unfortunately WCF doesn't seem to work well in this situation. I've tried overriding the default host with a custom host factory. That's not an acceptable solution because it needs to work from all hosts, ...

Generating the App.Config file for a Managed Windows Service using WCF

My next project is going to be using Windows Communication Foundation to host Managed Windows Services, so I have been trying to follow a HOWTO on msdn - How to: Host a WCF Service in a Managed Windows Service. Sounds like a perfect match. All was well until it started mentioning an App.Config file but without outlining how it got gene...

Increasing the timeout value in a WCF service

Hi, How do I increase the default timeout to larger than 1 minute on a WCF service? ...

Setting SendTimeout in my WCF app.config

Hi, Little confused looking at my app.config, it looks like this: <system.serviceModel> <servcies> <service> <endpoint address="" binding="basicHttpBinding"> <identity> <dns value="localhost" </identity> <endpoint> </service> </services> <behaviors> <serviceBehaviors> ...

ASP.NET: WCF and Could not load file or assembly 'App_Web_hamznvwf

I have recently begun working with AJAX-Enabled WCF, and have been plagued with this .NET caching issue - Could not load file or assembly App__Web__hamznvwf I was having issues with this 4 to 5 times a day on my server (Win 2003) - see first post So I moved my files off of the server and started running the project locally (Win XP). Ar...

What is the best option for passing data from SSIS to WCF?

We are trying to get data out of a SQL Server DB and submit it to a WCF web service. Since using a windows service is not a option in this case, I thought of using SSIS. I have tried using the Web Service Task, but I'm having difficulties getting it to work. I also understand there are limitation to using Web Service Task. What is the ...

Enable SSL for my WCF service

Hi, I have a WCF service that uses basicHttpbinding in development. Now in product we want to use SSL, what changes do I have to make to force SSL connections only? ...

Why doesn't my ChannelFactory see my endpoint?

I've been following Miguel Castro's excellent article on WCF here and it's all working nicely, except that I have the following code public AdminClient() { ChannelFactory<IProductAdmin> factory = new ChannelFactory<IProductAdmin>(); productAdminChannel = factory.CreateChannel(); } In my app.config file, I have the following co...

Primer for X.509 certificates on Windows

I am presently studying the topic of encrypting and signing SOAP messages via WSE 3.0 or WCF. Since I have not participated in distributed application development involving the public Internet, I find my knowledge on X.509 ceritificates lacking and how it works in the Windows certificate store mechanism. It is not about asymmetric crypto...

Is there a service for monitoring secured WCF endpoints in the same way that HTTP monitoring services do?

Hi all, A service I have in WCF occasionally goes down due a problem with a COM component. While I am troubleshooting I would like to setup another host to make regular calls to this service to monitor availability. It is slightly more complicated that a simple HTTP call though as the service is secured by SSL and WCF authentication (u...