From: JimLad on
Hi,

I am trying to understand how VS2008 (3.5) decides on the current
culture. I am finding this very confusing.

I have checked my web.config and machine.config and neither have a
globalisation page. I thought that would mean that it would pick up
regional settings but it didn't seem to. Then I looked at the ASP.NET
page in IIS - it shows a culture of af-ZA (Afrikaans - South Africa).

Where is it getting this from? This is not the culture on the machine
and noone would have ever set it to this culture... What on earth is
going on?

Cheers,

James
From: Alexey Smirnov on
On Jan 25, 4:02 pm, JimLad <jamesdbi...(a)yahoo.co.uk> wrote:
> Hi,
>
> I am trying to understand how VS2008 (3.5) decides on the current
> culture. I am finding this very confusing.
>
> I have checked my web.config and machine.config and neither have a
> globalisation page. I thought that would mean that it would pick up
> regional settings but it didn't seem to. Then I looked at the ASP.NET
> page in IIS - it shows a culture of af-ZA (Afrikaans - South Africa).
>
> Where is it getting this from? This is not the culture on the machine
> and noone would have ever set it to this culture... What on earth is
> going on?
>
> Cheers,
>
> James

Hi James,

first of all, this is not related to VS2008. The website takes
configuration from the web.config file and server settings, but not
from IDE.

You problem seems to be caused by IIS configuration. Go to IIS, right-
click your website and select properties, then go to ASP.NET tab,
click Edit configuration and then Application. And check what
Globalization Settings it has.

Hope this helps
From: JimLad on
On 25 Jan, 15:50, Alexey Smirnov <alexey.smir...(a)gmail.com> wrote:
> On Jan 25, 4:02 pm, JimLad <jamesdbi...(a)yahoo.co.uk> wrote:
>
>
>
>
>
> > Hi,
>
> > I am trying to understand how VS2008 (3.5) decides on the current
> > culture. I am finding this very confusing.
>
> > I have checked my web.config and machine.config and neither have a
> > globalisation page. I thought that would mean that it would pick up
> > regional settings but it didn't seem to. Then I looked at the ASP.NET
> > page in IIS - it shows a culture of af-ZA (Afrikaans - South Africa).
>
> > Where is it getting this from? This is not the culture on the machine
> > and noone would have ever set it to this culture... What on earth is
> > going on?
>
> > Cheers,
>
> > James
>
> Hi James,
>
> first of all, this is not related to VS2008. The website takes
> configuration from the web.config file and server settings, but not
> from IDE.
>
> You problem seems to be caused by IIS configuration. Go to IIS, right-
> click your website and select properties, then go to ASP.NET tab,
> click Edit configuration and then Application. And check what
> Globalization Settings it has.
>
> Hope this helps- Hide quoted text -
>
> - Show quoted text -

Hi Alexey,

Yep sorry about that. Obviously this is Framework/IIS related, not
VisualStudio related.

Yes it is the IIS ASP.NET showing the af-ZA culture. That's already
established. I am just confused as to where this value is coming from?
This must be a default setting somewhere as I certainly didn't change
it and neither did any of my colleagues. It is also not the regional
setting on the machine. Is this a default setting in IIS?

James
From: Alexey Smirnov on
On Jan 25, 5:27 pm, JimLad <jamesdbi...(a)yahoo.co.uk> wrote:
> On 25 Jan, 15:50, Alexey Smirnov <alexey.smir...(a)gmail.com> wrote:
>
>
>
>
>
> > On Jan 25, 4:02 pm, JimLad <jamesdbi...(a)yahoo.co.uk> wrote:
>
> > > Hi,
>
> > > I am trying to understand how VS2008 (3.5) decides on the current
> > > culture. I am finding this very confusing.
>
> > > I have checked my web.config and machine.config and neither have a
> > > globalisation page. I thought that would mean that it would pick up
> > > regional settings but it didn't seem to. Then I looked at the ASP.NET
> > > page in IIS - it shows a culture of af-ZA (Afrikaans - South Africa).
>
> > > Where is it getting this from? This is not the culture on the machine
> > > and noone would have ever set it to this culture... What on earth is
> > > going on?
>
> > > Cheers,
>
> > > James
>
> > Hi James,
>
> > first of all, this is not related to VS2008. The website takes
> > configuration from the web.config file and server settings, but not
> > from IDE.
>
> > You problem seems to be caused by IIS configuration. Go to IIS, right-
> > click your website and select properties, then go to ASP.NET tab,
> > click Edit configuration and then Application. And check what
> > Globalization Settings it has.
>
> > Hope this helps- Hide quoted text -
>
> > - Show quoted text -
>
> Hi Alexey,
>
> Yep sorry about that. Obviously this is Framework/IIS related, not
> VisualStudio related.
>
> Yes it is the IIS ASP.NET showing the af-ZA culture. That's already
> established. I am just confused as to where this value is coming from?
> This must be a default setting somewhere as I certainly didn't change
> it and neither did any of my colleagues. It is also not the regional
> setting on the machine. Is this a default setting in IIS?
>
> James- Hide quoted text -
>
> - Show quoted text -

It seems that this is by default for IIS6. It simply set af-ZA because
it is the first item in the culture list. This behavior seems to have
been changed in IIS7 (Windows 2008) and has became more clever: by
default culture and uiculture is set to "Invariant Language (Invariant
Country)".
From: JimLad on
On 25 Jan, 16:49, Alexey Smirnov <alexey.smir...(a)gmail.com> wrote:
> On Jan 25, 5:27 pm, JimLad <jamesdbi...(a)yahoo.co.uk> wrote:
>
>
>
>
>
> > On 25 Jan, 15:50, Alexey Smirnov <alexey.smir...(a)gmail.com> wrote:
>
> > > On Jan 25, 4:02 pm, JimLad <jamesdbi...(a)yahoo.co.uk> wrote:
>
> > > > Hi,
>
> > > > I am trying to understand how VS2008 (3.5) decides on the current
> > > > culture. I am finding this very confusing.
>
> > > > I have checked my web.config and machine.config and neither have a
> > > > globalisation page. I thought that would mean that it would pick up
> > > > regional settings but it didn't seem to. Then I looked at the ASP.NET
> > > > page in IIS - it shows a culture of af-ZA (Afrikaans - South Africa).
>
> > > > Where is it getting this from? This is not the culture on the machine
> > > > and noone would have ever set it to this culture... What on earth is
> > > > going on?
>
> > > > Cheers,
>
> > > > James
>
> > > Hi James,
>
> > > first of all, this is not related to VS2008. The website takes
> > > configuration from the web.config file and server settings, but not
> > > from IDE.
>
> > > You problem seems to be caused by IIS configuration. Go to IIS, right-
> > > click your website and select properties, then go to ASP.NET tab,
> > > click Edit configuration and then Application. And check what
> > > Globalization Settings it has.
>
> > > Hope this helps- Hide quoted text -
>
> > > - Show quoted text -
>
> > Hi Alexey,
>
> > Yep sorry about that. Obviously this is Framework/IIS related, not
> > VisualStudio related.
>
> > Yes it is the IIS ASP.NET showing the af-ZA culture. That's already
> > established. I am just confused as to where this value is coming from?
> > This must be a default setting somewhere as I certainly didn't change
> > it and neither did any of my colleagues. It is also not the regional
> > setting on the machine. Is this a default setting in IIS?
>
> > James- Hide quoted text -
>
> > - Show quoted text -
>
> It seems that this is by default for IIS6. It simply set af-ZA because
> it is the first item in the culture list. This behavior seems to have
> been changed in IIS7 (Windows 2008) and has became more clever: by
> default culture and uiculture is set to "Invariant Language (Invariant
> Country)".- Hide quoted text -
>
> - Show quoted text -

But Invariant Language (Invariant Country) uses American date format,
but I was getting British/Afrikaans date format. So looks like IIS
actually uses the AF-ZA value, rather than just having an erroneous
display... As I am based in the UK I was by pure fluke getting the
right format. By the way, my dev machine is XP, using IIS 5.

Thanks for the help. I'll be adding a Globalization section to all my
web.configs from now on!

e.g.
<!-- Set date formats and currency formats and insulate
application against external changes on the server.-->
<globalization uiCulture="en-GB" culture="en-GB" />

James