Solution for Date Format Issue After Deploying MVC Application in IIS 8

MVC Application deployed in IIS 7 using MSSQL Server 2005 and MSSQL Server 2008 R2 didn't encountered issue on date format. But after the compatibility test conducted for deployment in Window 8 operating system using IIS 8 and MSSQL Server 2014 dates encoded were displayed in (dd/mm/yyyy) format which differs from the original format which was (mm/dd/yyyy).

After series of test conducted to determine the cause, it was found out that you need to set the value of the following in 2 different options.

  1. culture
  2. uiCulture


Option 1: Via Internet Information Services



  1. From the features view select .Net Globalization
  2. Set Culture to English (United States) (en-US)
  3. Set UI Culture to English (United States) (en-US)
  4. Select Apply Action
  5. Restart IIS


Option 2: Via Webconfig

Add the following lines before  </system.web>

<globalization culture="en-US" uiCulture="en-US" />

Hope this helps.

No comments:

Post a Comment