I have hosted one of my site on IIS 7, WS2008. Later i have realize there is some datetime format issue, like me expecting things in dd/MM/yyyy format but it was in MM/dd/yyyy format and because of this it used to give me datetime conversion error.
So i have changed the datetime format by following step:
Control Panel -> Regional and Language Options -> Advanced
and changed registry entry
regedit >> HKEY_USERS>>DEFAULT>>Control Panel>>International
and here we have changed "sLongDate" and "sShortDate" key in dd MM yyyy format
and restarted the server.
Now, the issue is if i create new website i'll found everything is working fine including my datetime format as well
But my actual site which i have created before making all these datetime setting changes is having no change at all, still i m facing same datetime issue.
So i have deleted that site and hosted same site again with same IP address and at same port, but still same issue.
So, is it like there is some configuration of datetime for specific port.
I can not change my port.
Please suggest me proper solution.
Thanks in Advance...
After lot's of hunt i have found the solution of my problem:
1) Change the datetime format of your server from:
Control Panel -> Regional and Language Options -> Advanced
2) Open IIS and follow below steps: (For IIS7)
- Click on you Website - Select .NET GLOBALIZATION option - From Culture tab, select required Culture and UI Culture. - Finally iisreset. - Dones....
Change in registry entry
regedit >> HKEY_USERS >> DEFAULT >> Control Panel >> International
and we have changed "sLongDate" and "sShortDate" key in dd MM yyyy format
and restart server.
Change the datetime format of your server from:
Control Panel -> Regional and Language Options -> Advanced
Open IIS and follow below steps: (For IIS7)
- Click on you Website
- Select .NET GLOBALIZATION option
- From Culture tab, select required Culture and UI Culture.
- Finally iisreset.
- Dones....
This Answer posted by Sham worked for us. We were upgrading the server and there were no changes in application or DB but after upgrade we got string format issue for date time. Above suggestion helped me...
来源:https://stackoverflow.com/questions/11237765/datetime-format-issue-in-iis-7-server