Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a client in the US that wants all time displayed as military time, but everything else is supposed to be US Culture.

In my global.asax I am creating a copy of the US culture and applying the GB time display to create a US culture with Military time.

Reason I am doing this is I could not find a culture capable of it, however if anyone knows, that would be great.

The problem I am running into, is when we deploy the website to IIS (version 6), it all reverts back seemingly to US culture.

Looking up how to change the culture, I found the setting in ASP.NET Tab -> Edit Configuration -> Application Tab

Default value is af-ZA.

There seems to be no option to disable this overriding of culture, and I don't believe af-ZA is right anyways?

Is there a way to prevent IIS from overriding a culture programmatically set in ASP.NET?

Note: Asking here since I'm looking for server side solution, not programming one. Thanks!

share|improve this question
up vote 3 down vote accepted

This is at least partially a coding question. Basically, you need to create and register your new culture using the CultureAndRegionInfoBuilder class from System.Globalization.

Once registered, you can then choose your new culture within the ASP.Net application settings. (or within the web.config file for your application.)

Here are some references that should get you started:

share|improve this answer
After finding my own solution, yours looks to be the correct way to do what I was achieving, so marking it as correct. Thanks! – Brett Allen Feb 23 '10 at 18:29

Found the answer to my question after talking to someone more versed in servers and

Apparently you can -only- set application wide cultures in the Web.config

I was setting it in the application's main thread in global.asax which did not carry over to child threads processing page requests.

Interesting thing is, when running on local machine through Visual Studio's hosting process, all request must be done through the same thread.

This is what lead me to believe it was an issue with IIS, since not until we put it on IIS did the issue appear.

My solution: (Accepted a more proper solution)

A custom culture must be set on each page request thread. My solution was to put it into the Master page load. IIS does not override your settings.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.