Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
Why is the culture set to the current thread
Why is the culture set to the current thread?
✍: Guest
First let me explain this question. If you look at the code snippet of how to set the culture
info.
Thread.CurrentThread.CurrentCulture = new CultureInfo(strCulture);
It uses the current thread to set it. What does that mean? Let’s drill down a bit of how IIS
handles request to understand this concept. When any user requests a resource from IIS
like an ASPX page or any other resource. IIS services that request in his own thread. That
means if 100 users have requested some resource from IIS he will serve every request in
its own thread. In short IIS will spawn 100 threads to service the 100 request. It’s very
much practically possible that you can have different locale in different threads. So when
we set a culture we can not set it for the whole application as it will affect all the requests.
So when we set a culture we set it to a particular thread rather to the whole application.
2007-11-02, 5258👍, 0💬
Popular Posts:
What is continuous and staged representation? CMMI contains 25 key process areas which organization ...
How To Create an Array in PL/SQL? - Oracle DBA FAQ - Introduction to PL/SQL If you want create an ar...
Can one execute dynamic SQL from Forms? Yes, use the FORMS_DDL built-in or call the DBMS_SQL databas...
What is a measure in OLAP ? Measures are the key performance indicator that you want to evaluate. To...
What will be printed as the resultof the operation below: int x; int modifyvalue() { return(x+=10); ...