wcf

WCF response object contents

I see WCF response types (i.e. the types of objects returned from WCF handlers) containing DTO types which in-turn contain the fields the client is interested in. Is this standard practise? Why not put the fields directly on the response type? ...

PollingDuplexHttpBinding over HTTPS

I am trying to setup a Silverlight 3 application to use a WCF web service through the PollingDuplexHttpBinding. I have this working over basic HTTP, but I need to get it to work over HTTP*S*. Server web.config: <system.serviceModel> <extensions> <bindingExtensions> <add name="pollingDuplexHttpBinding" ...

WCF Example with TransportWithMessageCredential without proxy class

So I'm using a WCF service using basicHttpBinding with TransportWithMessageCredential. I can authenticate just fine with it from .net to .net. Problem is I want to provide some samples to this third party but everything is encrypted. So I can't just wireshark it and go about my day. var request = (System.Net.HttpWebRequest)System.Net.We...

WCF DataMember List<> without enclosing element

The following DataContract: [DataContract(Namespace = "http://namespace", Name = "Blarg")] public class Blarg { [XmlAttribute("Attribute")] public string Attribute{ get; set; } [DataMember(Name = "Record", IsRequired = false, Order = 4)] public List<Record> Record{ get; set; } } Seriali...

How to Use WCF objects to create a Report?

In Visual Studio 2010, how do you create a report using a List returned from a WCF call? ...

WCF REST web service: contract name cannot be found

I am using WCF REST Start kit to build a RESTFul service. I defined a service like this: namespace MyNS { [ServiceBehavior(IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single)] [AspNetCompatibilityRequirements( RequirementsMode = AspNetCompatibil...

What state is contained in a WCF Client object?

Like the title says, I'm curious to know what state is contained in a WCF client proxy object - should I be new'ing up tons of these casually and not caring? Or are they more heavyweight and I shouldn't be so cavalier about creating them? ...

Find the path to my WSDL

I have a silverlight 4 app. When I made that it created 2 projects. My actual silverlight app and one called MySolutionName.web (not sure what that does except host my silverlight page). Based on feed back from this question I added my WCF stuff to the MySolution.web project. But when I call the service from my silverlight app the val...

WCF: Best way to send binary data for IIS-hosted services

I have WCF service that is IIS-hosted and I have to send binary data (memory stream that is created by service) in intranet environment. I use byte[] array in service contract method at present with httpBinding. Though array is not too big (500 KB typically) I am worried about unicode overhead (asmx soap web-services had one, but I'm ne...

Unit testing my wcf services

I am hoping there is a better way to do this. Do I really have to wrap each method of my wcf service into an interface in order to use it? I don't think my fellow developers are going to buy into this because of the amount of time it takes... there must be a better way! ...

Remove dependancies on wcf services so I can unit test the class

I want to remove dependencies from my classes for WCF Services. I want to inject them into the constructor as an interface and then mock the interface when I am testing that class. What is the best practice and the fastest way for doing this? my class: class Test { public IMyWCFInterface _wcf; public Test(IMyWCFInterface wcf) { _wcf...

How to create a WCF service with Mono?

I have a WCF running on Windows. I'd like to deploy it - or at least test it - on a development server running SUSE and Mono. After asking about WCF examples in Mono on the IRC channel #monodev at GimpNet I've download the examples from the olive module in the subversion. No examples actually uses a Web.config file to create the servi...

HTTP Error 404.3 - Not Found" while browsing wcf service on Windows Server 2008(64bit)

I am developing an application based on .Net Framework 3.5 sp1 and hosted on windows server 2008(64bit). While browsing wcf service (.svc) locally every things is ok but while browsing with full domain URL, it got an error. local address is like this: http://localhost/MyService.svc and domain address is like this: http://MySite.ir/MyS...

WCF security between WinForms client and Shared Host webserver

Ok, I have developed this WinForms client, which interacts with a server (ASPX Application) by means of WCF calls. I would now like to deploy the server to my shared webhost, but I'm kinda new to WCF and especially the security possibilities behind it. The goal is to kind of secure the WCF service, so that not everybody that knows or f...

How can I set log4net appender to Wcf service?

Hi all! I want to configure appender that will send logs to wcf service. I've already service in the air that can get logs at address "http://localhost:8080" with method 'Get logs(string log);' I need help how to configure the appender in order to send logs to this service? Thanks in advance! ...

How to serialize SubSonic generated class?

I'm trying to use SubSonic with WCF. I can get data into List but I can't return that data to client side, its error is The socket connection has been disposed. Object name: 'System.ServiceModel.Channels.SocketConnection'. I try to send and retrieve data to/from WCF by POCO object and it working but when I try to use generated cl...

How to invoke a WCF webservice using HTTP Get.

I want to invoke a wcf webservice using a url query string. Like if I have a webserive that expose a ADD method of adding two integers. I want to invoke this service using http://mywebserviceAddress/Add?x=4&amp;y=5 Is it possible to do this. I am new to webservices, this may be very easy for most of you. ...

WCF REST client with TransferMode=Streamed - logging entire ("raw") http requests/responses

This is on .Net 4, full framework. I'm trying to make a simple winforms app that will make some simple WCF REST calls. It's using ChannelFactory and the service contract interface. Of the ~20 methods in the interface, 2 of them involve Stream (an upload and a download method) so the service side (and currently also the client side) us...

WCF: why do I have to set [field]specified manually to send value to server?

I generated WCF proxy that has integer [fieldName] in message contract request class. I tried to send value to server but value always came 0 until I manually set [fieldNameSpecified] to true. Is there something wrong with proxy generation or WCF was designed this way? What are the reasons behind [Specified] fields especially if strin...

Identifying WCF Client ID

I have a WCF web service that exposes several business methods. I also have two clients - an asp.net GUI and a data migration application that both connect to the wcf backend to invoke various business transactions. I need my backend to be able to identify and distinguish between which wcf client has made a call to some variant logic. ...