Obtaining Culture Info ???

C

cmrchs

Hi,

I try to obtain the current culture of a server by executing :

string str = Thread.CurrentThread.CurrentCulture.ToString();

Executing this in a console-applicastion results in the correct string (e.g. "en-AU")
but when executing in ASP.NET does the command always return "en-US" ???

How come ?
How can I make sure it does return the correct cultureInfo ?

thanks
Chris

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
J

Jon Skeet [C# MVP]

I try to obtain the current culture of a server by executing :

string str = Thread.CurrentThread.CurrentCulture.ToString();

Executing this in a console-applicastion results in the correct string (e.g. "en-AU")
but when executing in ASP.NET does the command always return "en-US" ???

How come ?
How can I make sure it does return the correct cultureInfo ?

I suspect the account under which ASP.NET is running really is running
as en-US. Changing the default locale for the whole system may change
this (as opposed to the one for an individual user). Not sure though...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top