title: Setting current culture with threads in ASP.NET MVC
body: <p><a href="http://helios.ca/2009/05/27/aspnet-mvc-and-localization/">Here's</a> an example of SetCulture attribute which inside does something like this:</p>
  
  <pre><code>    public void OnActionExecuting(ActionExecutingContext
          filterContext)
      {
          string cultureCode = SetCurrentLanguage(filterContext);
  
          if (string.IsNullOrEmpty(cultureCode)) return;
  
          HttpContext.Current.Response.Cookies.Add(
              new HttpCookie("Culture", cultureCode)
              {
                  HttpOnly = true,
                  Expires = DateTime.Now.AddYears(100)
              }
          );
  
          filterContext.HttpContext.Session["Culture"] = cultureCode;
  
          CultureInfo culture = new CultureInfo(cultureCode);
          System.Threading.Thread.CurrentThread.CurrentCulture =
              culture;
          System.Threading.Thread.CurrentThread.CurrentUICulture =
              culture;
      }
  </code></pre>
  
  <p>I was wondering how does this affect a site with multiple users logged on and each one setting their own culture? What is the <em>scope</em> of a thread here with regards to the IIS worker process (w3wp) that the site is running in?</p>