IIS and MSSQL dates using hidden default locale setting on Windows Server 2003?

Posted on 2007-10-01
Last Modified: 2008-09-17
So, this is an old problem but I would love to get to the bottom of it's cause, rather than the workaround...

I have an ASP.NET site which uses a MSSQL 2000 database.  On one web server, it displays everything correctly with UK date formats dd/mm/yyyy as expected throughout the whole site.  But on another server (Windows Server 2003), any query that returns dates, comes back in US format mm/dd/yyyy.  The MSSQL server is the same in both cases.

Now I know I can put LCID=2057 in each of the pages of the site to combat this issue but I would really love to know what needs to be set on the server to enable everything to run in UK format by default.

All the regional setting in Control Panel are set to UK.... what's going on?  Is there a hidden default locale setting in the IIS metabase or something?

Help appreciated...
Question by:jammy-d0dger
    LVL 5

    Accepted Solution

    the iisdiag tool from will tell what is hapening and how to solve it
    LVL 37

    Assisted Solution

    not sure if you consider it a "workaround"...but you should be able to set the locale in the web.config file...which should override any server settings...

        responseencoding=" utf-8"
        fileencoding=" utf-8"
        uiculture="en-GB" />

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
    Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now