Click here to Skip to main content
13,504,050 members
Rate this:
Please Sign up or sign in to vote.
Hi All experts,

I am a bit new to WCF. I had explicit requirement to prepare a wcf application with below requiements,

1. Need to prepare synchronous WCF service hosted in IIS
2. Client will consume synchronous WCF service.
3. request & response might take long time, as other applications are involved in this process.
4. Need to maintain the state during this long request & response process.
5. Should not use any Workflows

So basically, I need to maintain state without lossing/deadlocks during the long synchronous request<->response process.

Please share your valuable suggestion.

Posted 11-Feb-13 7:02am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Yeah, requirements like this comes in case of Services which depend on multiple resources.

I'd suggest you the following points, implementing which you could achieve your desired result:
1-In ServiceContract use the following SessionMode attribute:

2-In ServiceBehaviour use PerSession attribute as following:

3-And since you are saying that multiple applications are involved in this Service, so use Reentrant property of Concurrency in ServiceBehaviour as following:

This will help you to avoid any kind of DeadLock.

I'm sure if you could use the above properties efficiently then you would surely achieve your desired goal.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.180417.1 | Last Updated 11 Feb 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100