wcf

WCF Self hosting on the client? Good or Bad

Am wondering if anybody has tried this a technique to get events to the client from the server side. I have an environment that uses Unix based servers and so can't use WCF duplex / callbacks etc. The idea being that my clients are windows boxes running a thick .net app would spin up a WCF self host and register their self host URL o...

WCF ticket base authentication

Hi, I am writing WCF service that uses wsHttpBinding binding,which is not hosted in IIS but in Windows Service.I want to have a Login(user,pass) method in service, which will give a ticket to the client if the user is valied. Can anyone help me to understand how to implement ticket base authentication in WCF? Is there any standard mecha...

WCF CustomBinding Configuration

I've written a custom binding class that inherits from CustomBinding. My custom class overrides the BuildChannelFactory method and uses a custom ChannelFactory to create a custom channel. I'm having difficulties using the custom binding class in the WCF client. I am able to use my custom binding class if I configure it in code: Binding...

WCF / SSL Issue: The requested service, 'https://my.url/myService.svc' could not be activated. See the server's diagnostic trace logs for more information.

Hey All, I'm trying to reproduce a production system locally but I having issues using the services. I have set up the local instance of the server as close as I can to the production server but my local client will not work with it. However the same client on my local machine works fine with the production instance. In order to use ...

Getting parameters for web service programmatically?

Hi. I have a web based system where users should be able to fetch data from a web service by entering the URL and the necessary parameter values. My problem is, somehow I need to find out the structure of the parameters required in the soap body, which is not necessarily just one or two strings, but could be a whole object tree. Trans...

.NET WCF Can't Decode "Chunked" response.

I am calling an axis web service from WCF. The request works just fine but I get back null values. Using Fiddler I was able to determine that the response is coming base as Transfer-Encoding: chunked. This means that there are control characters in in the response BEFORE the xml. WCF does NOT throw an error. It just moves on and the...

Web site project and WCF project in the same or different solution: pros and cons

I have a Visual Studio solution containing a web site project plus a bunch of supporting projects (domain model, data access, etc). I want to expose an API to the same underlying data, via urls under the same domain, so I developed a WCF/REST project to do this (which has dependencies on the same set of domain/data access projects). No...

IQueryable<> Serialization - C#-VS2008-WCF

I built my *.dbml file with the required tables and that generated the relationships, 1 to many. One of my methods in my WCF Service library has this query IQueryable<Client>localClient = from c in db.Clients where c.ClientID.Equals(2612) select c; foreach(Client currentClient in localClient) { //Cal...

EntitySet serialization - WCF, C#, VS2008

I asked this earlier and followed Marc's advise. That did not help me. link text My client object is what I want to serialize but with Employee entity set, with any serialization, I get my object serialized without any reference to my EntitySets. Anyone successfully serialized such objects? ...

SSL Error with WCF Service using Transport Security & Cert. Authentication

I don't know if this is a question more suited for Serverfault.com, really depends on the answer, but I have followed this tutorial in .NET C# to setup a WCF service under 'wsHttpBinding' (Transport Security & Certificate Authentication), I have created a test development certificate using the methods described here and I have also confi...

WCF Concurrent requests piling up on the server when using WSHttpBinding

I have a WCF client/server app which is communicating over HTTP using the WSHttpBinding. Server Setup: self-hosting, using the standard WCF ServiceHost. My actual service class is attributed as: [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.PerSession, UseSynchronizationConte...

A question about WCF when using app.config

I am a beginner of WCF,I write a simple example of it,and the app.config files of my application as follows: Host: <services> <service name="WCFService.Service.CalculatorService" behaviorConfiguration="calculatorBehavior"> <host> <baseAddresses> <add baseAddress="http://10.1.9.210:8080/GeneralCalculator"/&gt;...

WCF readerQuotas settings - drawbacks?

If a WCF service returns a byte array in its response message, there's a chance the data will exceed the default length of 16384 bytes. When this happens, the exception will be something like The maximum array length quota (16384) has been exceeded while reading XML data. This quota may be increased by changing the MaxArrayLeng...

WCF: How can I programatically recreate these App.config values?

Hi, I have a WCF service that works ok if I create the service without specifying any binding or endpoint (it reads it from the generated values in the App.config when I registered the WCF via Visual Studio). I have a simple method that returns the service reference: return new SmsServiceReference.SmsEngineServiceClient(); This work...

Client configuration to consume WCF JSON web service

Hi, I have configured the web service to use Json as described on this blog: http://www.west-wind.com/weblog/posts/164419.aspx and various other blogs, but I couldn't create a client to consume this service. I tried various things, but invariably I got meaningless exceptions. What is the correct way to implement the (WCF I should add) c...

Concurrency with Linq To Sql Stored Procedures

I come from the asp.net world where we'd use an objectdatasource, hooked up to data access layer, and set it's ConflictDetection property to "CompareAllValues". There is an OldValuesParameterFormatString on the ObjectDataSource that you use to identify old value parameters. The sql procedure that does an update would then require both n...

Seralize System.Data.Linq.SqlClient.SqlProvider+SingleResult - C#, WCF,VS2008

This is my sample code var returnResult = datacontext.Searchresult('1'); returnResult is of System.Data.Linq.SqlClient.SqlProvider.SingleResult Trying to serialize it using DataContractSerializer results in error below. {"Type 'System.Data.Linq.SqlClient.SqlProvider+SingleResult`1[Service.SearchResult]' cannot be serialized. Conside...

WPF to WCF Permission issue

I have created a WPF browser application that I wish to connect to a WCF service. The service is in the same solution as the WPF application. It is the default service that Visual Studio creates with a method called GetData (int) I am attempting to call this service with the following code: var client = new Service1.Service1Client();...

In WCF is it possible to pass a delegate to the remote object?

Is it possible to pass a delegate to a WCF remote object from the client and have the remote object execute the delegate? I would guess not since a delgate is a function pointer for the client process. My goal is to have an interface structure that I can "subscribe" to events from a client to the interface. I would pass a delgate from...

How To: WCF with Transport Security+Server Cert Auth. WITHOUT Client Cert?

Am I correct in understanding that a WCF Service could be setup with "Transport Security", + "Certificate Authentication" and without a "Client Certificate" installed client side? My scenario would be: WCF Services on Remote Server Windows Forms Client shipped potentially to hundreds of users (authenticates users (against DB) and per...