wcf

Concurrent WCF calls via shared channel

I have a web tier that forwards calls onto an application tier. The web tier uses a shared, cached channel to do so. The application tier services in question are stateless and have concurrency enabled. But they are not being called concurrently. If I alter the web tier to create a new channel on every call, then I do get concurrent ca...

Simple Data Caching using Weak References in WCF

Given that I have the following WCF service: class LookUpService { public List<County> GetCounties(string state) { var db = new LookUpRepository(); return db.GetCounties(state); } } class County { public string StateCode{get;set;} public string CountyName{get;set;} public int CountyCode{get;set;} } ...

Silverlight WCF with two-way SSL security certificates

Dear All! I would like to implement a server - client software with the following security requirements: WCF-Services need to be secured with SSL and Certificates for both, the server and the client Client certificates need to be generated programmatically upon user registration Client-certificates are deployed via a an automatically ...

Why is my WCF Rest Service on IIS7 Authenticating TWICE!?!?

Ok, if someone could shed some light on this for me, I would greatly appreciate it. So here we go. I had a rest service running fine the other day but after I accidentally overwrote the web.config all hell broke loose. I've spent the past day and a half trying to sort things out but I can't seem to figure out what is missing or misplaced...

Is it weird or strange to make multiple WCF Calls to build a ViewModel before presenting it?

Am I doing something wrong if I need code like this in a Controller? Should I be doing something differently? public ActionResult Details(int id) { var svc = new ServiceClient(); var model = new MyViewModel(); model.ObjectA = svc.GetObjectA(id); model.ObjectB = svc.GetObjectB(id); model.ObjectC = svc.GetObjectC(id); ...

WCF service Appdomain details

I am reading WCF book.It states that the client can consume service running on same AppDomain or different application Domain. Suppose I am creating a service in IIS localhost. example localhost\TestService\Service.svc (WCFService Website). and my client is in d:\demo\client (windows form) Does it mean client is running on dif...

WCF: Switched computers, now bidirectional serialization has stopped working

I'm using this code generator to create business objects, with bidirectional serialization attributes, that can be sent from a server to a client using WCF. This used to work, but I've switched computers, and now I seem to only have unidirectional serialization, even though the source code has not changed. This is a property that I woul...

WCF Operation contract availability

This question was asked at interview. Say I have a contract. [ServiceContract] public interface IMyService { [OperationContract] void methodForClientA(); [OperationContract] void AnothermethodForClientA(); [OperationContract] void methodForClientB(); [OperationContract] void AnothermethodForClientB(); } When a...

RIA Services for transmitting non DB object-graph

I have been getting into RIA services because I thought it would simplify dealing with the services layer of web applications I wish to build. I see lots of examples out there showing how to create DomainService classes which expose and consume entities that have some kind of relational database backing, and therefore have foreign-key re...

See what XML is being serialized down the wire for a WCF Service

I have a WCF service that I pass a lit of objects down from the server to the client, what I would like to do is to know what exactly is getting passed down to the client. How can I see the unecrypted serialized payload that is sent over the wire? ...

Service Contracts with Message causes duplicate proxy classes

Hi, I have a service contract with Message as shown below. [OperationContract] Message MyMethodWithMessage(Message myMsgParam); Everything works fine. I could host my services. But when I try to create proxies through "Add Service References", I am getting the duplicate proxy classes. If I take out the above OperationContract and re ...

WCF MaxReceivedMessageSize property not taking

Searched with no luck... I keep getting The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. It makes sense, so I go into both Server and client config and make the change: Client <system.serviceModel> ...

Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data

I created an assembly containing WCF service code and dropped into another web project. When I try to invoke a service method, I get the following inner exception: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Why th...

How to achieve maximum callback throughput with WCF duplex channels

I have setup a basic WCF client/server which are communicating via Named pipes. It is a duplex contract with a callback. After the client "subscribes", a thread on the server just invokes the callback as quickly as possible. The problem is I am only getting a throughput of 1000 callbacks per second. And the payload is only an integer! ...

Getting the contract

Is there a way to get a contract from a running service programatically? I want to compare the contract of a running service from a referenced contract in the client side. For example I have two instances of Service1 running on different machines that has different implementations. They both have a contract named IService1 but differe...

Using msmq and wcf

I had posted this question earlier post ? Started reading up on wcf and msmq. My first question would be - say i have a 100 messages in the queue , how would i tell my service to start working on each message asynchronously so that it is working on multiple messages at the same time. is this even possible or is it always a synchronous...

How to host WCF service and TCP server on same socket?

Tooday I use ServiceHost for self hosting WCF cervices. I want to host near to my WCF services my own TCP programm for direct sockets operations (like lien to some sort of broadcasting TCP stream) I need control over URL namespaces (so I would be able to let my clients to send TCP streams directly into my service using some nice URLs ...

Silverlight 4 accessing WCF Data Services: BeginInvoke frustrations.

Hi, I'm attempting to follow a pattern for performing WCF data service queries using the Silverlight 4 beta. The following is my code: public CodeTables() { CodeCountries = new ObservableCollection<dsRealHomes.CodeCountries>(); dsRealHomes.RealHomesEntities myClient = null; myClient = staticGlobals.Rea...

IIS7 + WCF + Silverlight problems

Hey, I've been building a silverlight application and a WCF service for a while now and recently tried to host them in IIS7. I installed IIS7 on Windows Server 2008 R2 and added these two application to my default website. I am having a number of problems so im hoping one of you can help out... 1) The silverlight and WCF service applic...

WCF over http settings needed

Hello, We currently have a WCF Service that works over https. But we want to change it to make it work over just http. Could any one tell me what all do I need to change to make the the wcf service work over http. Below is my config file values. Is there anything I else I need to cahnge other than the web.config?? ANy help greatly app...