Default Culture in VS2008?

Discussion in 'ASP .Net' started by JimLad, Jan 25, 2010.

  1. JimLad

    JimLad Guest

    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
     
    JimLad, Jan 25, 2010
    #1
    1. Advertising

  2. On Jan 25, 4:02 pm, JimLad <> 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
     
    Alexey Smirnov, Jan 25, 2010
    #2
    1. Advertising

  3. JimLad

    JimLad Guest

    On 25 Jan, 15:50, Alexey Smirnov <> wrote:
    > On Jan 25, 4:02 pm, JimLad <> 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
     
    JimLad, Jan 25, 2010
    #3
  4. On Jan 25, 5:27 pm, JimLad <> wrote:
    > On 25 Jan, 15:50, Alexey Smirnov <> wrote:
    >
    >
    >
    >
    >
    > > On Jan 25, 4:02 pm, JimLad <> 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)".
     
    Alexey Smirnov, Jan 25, 2010
    #4
  5. JimLad

    JimLad Guest

    On 25 Jan, 16:49, Alexey Smirnov <> wrote:
    > On Jan 25, 5:27 pm, JimLad <> wrote:
    >
    >
    >
    >
    >
    > > On 25 Jan, 15:50, Alexey Smirnov <> wrote:

    >
    > > > On Jan 25, 4:02 pm, JimLad <> 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
     
    JimLad, Jan 25, 2010
    #5
  6. JimLad

    Patrice Guest

    Do you have defined a language in your browser perhaps just as a test ? Or
    you have deleted all languages ?

    Not sure but the default could be "auto" in which case ASP.NET will use the
    preferred language transmitted by your browser(by using the accept-language
    http header)...

    --
    Patrice
     
    Patrice, Jan 25, 2010
    #6
  7. On Jan 25, 6:07 pm, JimLad <> wrote:
    >
    > 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.
    >


    As I mentioned, invariant culture is set by default in IIS7 under
    Win2008. Under XP and Win2003 I see the same af-ZA by default.
     
    Alexey Smirnov, Jan 25, 2010
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dejan Vesic
    Replies:
    1
    Views:
    686
    Chee Seong Ong
    Jul 3, 2003
  2. Aliasgar Pocketwala

    ASP.NET application wrong culture picked up

    Aliasgar Pocketwala, Jul 17, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    663
    Mario Vargas
    Jul 17, 2003
  3. Manu
    Replies:
    1
    Views:
    6,161
    Natty Gur
    Jul 20, 2003
  4. S. Justin Gengo

    Re: Differences between culture options

    S. Justin Gengo, Aug 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,443
    S. Justin Gengo
    Aug 8, 2003
  5. Replies:
    2
    Views:
    741
Loading...

Share This Page