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 8465133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:57:18+00:00 2026-06-10T14:57:18+00:00

We have a solution where we use a WCF Client Message Inspector to read

  • 0

We have a solution where we use a WCF Client Message Inspector to read a correlation id (and other values) out of a http header.

We then store this value in the System.ServiceModel.OperationContext.Current.IncomingMessageProperties.

The OperationContext.Current is the execution context of the current thread.

However, based on Jon Skeet’s answer the this question: Will a request in IIS run on a single thread?
The asp.net request will jump between threads.

This is exactly what we are experiencing, that the correlation id changes during the execution of the request.

Is there somewhere where we can store the values from the http request, so that they can be accessed lower down in the stack?

  • 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-06-10T14:57:19+00:00Added an answer on June 10, 2026 at 2:57 pm

    I’ve used the System.Web.HttpContext.Current.Items collection to store values that we’ve picked up in a MessageInspector, example

        public void AfterReceiveReply(ref Message reply, object correlationState)
        {
            var httpResponse =
                reply.Properties[HttpResponseMessageProperty.Name] 
                       as HttpResponseMessageProperty;
    
            if (httpResponse != null)
            {
                string cookie = httpResponse.Headers[HttpResponseHeader.SetCookie];
    
                if (!string.IsNullOrEmpty(cookie))
                {
                    System.Web.HttpContext.Current.Items.Add("MyCookies", cookie);
                }
            }
        }
    

    Elsewhere in the stack the values can be picked up from the Items collection using the same key.

    Please check this article by Scott Hanselman for more details.

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

Sidebar

Related Questions

I have a solution in VS 2008 that creates a DLL. I then use
I have a WCF service and a client that uses that service. They use
I would like to know what solution I can use in order to have
I have a page layout that I use in my SharePoint solution when I
I have two tabbar items(views) that use the same data, whats the best solution
We have an ASP.Net MVC solution built in VS2008 and TFS2008. We use TFS
I have two web applications in the same solution. They both use different membership/profile
I have 3 projects in my solution. 1 - client, 2 - server, 3
I have a wcf service which use wsDualHttpBinding, i get that error when i
I am trying to expose our WCF Web service to both out WPF client

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.