Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6091103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:17:22+00:00 2026-05-23T12:17:22+00:00

I have a WCF service with ConcurrencyMode = ConcurrencyMode.Multiple option. Can I safely read

  • 0

I have a WCF service with ConcurrencyMode = ConcurrencyMode.Multiple option. Can I safely read incoming request HTTP headers and set outgoing response ones considering the fact that service requests are processed concurrently? I doubt because WebOperationContext.Current is a global state. Does it check current thread?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:17:22+00:00Added an answer on May 23, 2026 at 12:17 pm

    ConcurrencyMode.Multiple make sense only if you have instancing which allows sharing the service instance. In case of REST service you most probably doesn’t have such instancing (unless you are using singleton service) and you should not have such instancing (because REST service doesn’t maintain state – all state is transferred in the request).

    REST service uses per request instancing and each request is served by a new thread (from thread pool) and new instance of the service class automatically. You don’t need this setting at all.

    WebOperationContext.Current retrieves current context from private thread static variable inside the context so it is not shared among threads.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF service which is used synchronously, but its ConcurrencyMode is set
I have a wcf service (parser service, byte[]=>string) [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Multiple)]
Can a single WCF Service endpoint be set up to authenticate against multiple Authentication
I'm new here and I hope anyonte can help me. I have WCF Service
I have a WCF service code like this: [ServiceContract] [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode =
I've got a WCF service with the following settings: NetNamedPipeBinding ConcurrencyMode.Multiple InstanceContextMode.Single Now I've
So I'm hosting WCF service in a WinForms application. I have the following [ServiceBehavior(ConcurrencyMode
I have WCF service that has http and net.tcp endpoints. I have deployed the
I have WCF service Service with some method LongTimeMethod. To avoid request timeout I
I have a WCF service that will serve multiple clients. They will have operation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.