wcf

Cannot access a disposed object

I am writing a tool to integrate with a web service, I have a method which just builds an ImportExportSoapClient object which is used to call the API methods for the web service, but when I call one of the methods I am getting Cannot access a disposed object System.ServiceModel.Channels.ServiceChannel? anyone had a similar experience or ...

WCF Service in ASP.NET application generating intermittent 404 errors

This problem has defeated my attempts at Google, so here goes. We were having an issue getting data from a WCF service (just lookup data, so we enabled it for HTTP GET requests). Every once in while it will return a 404. The stack trace does NOT appear to have WCF in the mix - the StaticFileHandler appears to be attempting to serve it...

C# Windows Service latest technology

All, I have been writting Windows Services for a while in C# deriving from ServiceBase. So far my services are hosted in servers where they usually listen to message queues and process messages. Is there a new way of creating such services in WCF ? Thanks, MK ...

WCF maxReceivedMessageSize not working

I have a WCF Service that has these configuration settings. When I call it from a client application I still hit the dreaded, "Maximum number of items that can be serialized or deserialized in an object graph is '65536'" What's wrong with my configuration below? <system.serviceModel> <bindings> <wsHttpBinding> <binding name="...

Preventing Duplication of the x509 Certificate Used on a WCF Client?

I have a WPF and WCF app that requires to install the certificate (.pfx) on the client side to enable WPF calling the WCF service. Now how can I prevent the client to export the certificate from his certificate store (so that he won't be able to grab the .pfx file and install it on another client computer)? ...

WCF Username/Password Prompt

This is kind of a dumb question, but I can't seem to find the answer on google. I'd like to protect my REST enabled WCF service WSDL with https username and password logon (like my Linksys router prompts me to enter when I navigate to 192.168.1.1). I'm already using a BasicAuthenticationRequestInterceptor with the WCF Rest Starter Kit....

Why should I use DataContract Serializer while I have XML/Binary serializer ?

Hi All, Can anyone please elabortae me the reasons why should I use Data Contract Serializer while we have XML/Binary serializer already there in .Net ? ...

Appfabric and WCF

Hi, I need to know whether it is rule of thumb to use WCF webservice inorder to use appfabric. Actually we have lots of files to be download from a IIS server to iphone. The thing is like we all have WCF services and we are actually avoiding MTOM stuff as it is little complicated to process the filedownload on iphone. So we thought of u...

How to mock web service call in a WF workflow?

I'm implementing a WCF web service based on WF. This web service consumes other web services which I'm not in charge of. So basically my service workflow contains several Send activities. I'm following the TDD approach, so the service implementation is to be covered by unit tests. I want to test proper invocation of 3rd party services. ...

encryption codes on .net WCF request and response

Hi all, I am using VS 2008 WCF to create a sample service. The problem is the request and response has lots of information like encoded string, codes, uuid and so on. when i tried the same source code on VS 2010 WCF it is like clean and does not have any special data like this. what could be wrong ? what should i change in my project se...

Best practice for using WCF Service in client side

There is two way to create WCF proxy in client side 1. Generating proxy by adding Service Reference 2. By using ChannelFactory.CreateChannel method like this ChannelFactory<IMyContract> factory = new ChannelFactory<IMyContract>(); IMyContract proxy1 = factory.CreateChannel(); proxy1.MyMethod(); Which is best approach to get proxy? ...

Why is my array of enumeration values null in my WCF service?

I have an array of enumerations on a WCF reuqest that comes through as null, no matter what I have tried. The service works apart from the issue with enumerations. Does anyone have any ideas why this might be? Enumeration code: [DataContract(Namespace = "http://services.myproject.com/requests/MyProject")] public enum Recommend...

WCF & Silverlight: How to go about without interfaces?

Hi All, Let me try to explain my challenge. I'm building a Silverlight app which will be using a WCF service. The WCF service returns a list of users and roles (and lots more but trying to keep it simple). In the SL app I need to fill several comboboxes with lists of users and roles. Usually I would use an interface to specify the ke...

The attribute 'endpointConfiguration' cannot be specified on element 'endpoint' when attribute 'kind' is not specified.

title is the exception message from wcf service client when i create object of proxy class i have simple wcf service with <security mode="Transport"> and <transport clientCredentialType="Basic" /> this is the app.config of client <system.serviceModel> <behaviors> <endpointBehaviors> <behavior name="NoValidationBeh...

How to cast a Dictionary into a CollectionDataContractAttribute decorated class

Hi, this is my first WCF service. I defined a response message that derives from a Dictionary like this: [CollectionDataContract(ItemName = "Product", KeyName = "ProductNumber", ValueName = "ProductName")] public class GetAvailableProductsResponse : Dictionary<string, string> { } When I try to run the following code in a service opera...

WCF Service - Accept Client Certificates

I have a requirement (govt client) to turn off all authentication schemes (No anon, NTLM, digest, basic, etc) in IIS6 and enable client certificates only. This part is non-negotiable. This WCF web service provides the data to a Silverlight client. With Basic authentication is on, everything works peachy. When it is turned off, we get...

How to "really" down-cast a DynamicProxy back to its original type (to send over WCF)

OK, the situation is we have a class, PatientDto, and a DynamicProxy generated by Castle, PatientDtoProxy. We're using this proxy in the Silverlight client, then want to send it back to the server via a WCF service call. The WCF service Contract expects a PatientDto (ie not the proxy) and, as expected, blows up if you try to send anyth...

WCF endpoint addressing problem

I'm trying to test some WCF extension stuff I've written, but I can't even get the basic WCF service up and running in my test class. The code is below: using System; using System.Collections.Generic; using System.Linq; using System.Text; using NUnit.Framework; using System.ServiceModel; using System.Threading; using System.ServiceModel...

WCF and Stored Procedure Options

I'm making my first WCF Service and I am unsure which route I should take with stored procedures and Linq to Sql. I understand that I can drag and drop stored procs to my DBML file and call them that way, or call them directly, not using the dbml. Is there a reason why i should choose one over the other? I guess I'm a little confused... ...

What is the best way to learn WCF?

Are there good books for learning WCF in C#? What do you recommend and why? ...