TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Huck
NA
1
0
WCF: Configure server-side call handling synchronization type at method level?
Mar 31 2008 6:20 AM
Hi, I am using WCF in a client-server architechture, my server has a UI and is configured as follows:
[ServiceBehavior(UseSynchronizationContext = true, InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Multiple)]
This means all calls made from my clients are handled on the server's UI thread, one after the other. This makes sense in the context of my application, but I have one particular two-way call that is quite lenghty and thread safe (reentrant). I would therefore like my server to handle that specific method call asynchronously, but to keep all other client calls handling synchronous in the server's UI thread. Please note that this is a server-side issue, I want to achieve this no matter how the clients call my server (synchronously or asynchronously).
Here are my questions:
1) Is it possible to configure my server to execute the client calls in its UI thread (UseSynchronizationContext = true), but to override that behavior on a per-call basis to specify a few methods that should be handled asynchronously?
2) If it is possible to configure the synchronization mode at the method level, can it be done in the config file of my server?
Thanks in advance.
Reply
Answers (
0
)
WCF Web Service with several clients
How to send SMS to mobiles from web applications using WCF??