Setting Culture for ASP.NET MVC application on VS dev server and IIS

后端 未结 4 1521
一整个雨季
一整个雨季 2020-11-30 00:41

This is more specific and cleaner version of this question - Different DateTimeFormat for dev and test environment

In the Application_BeginRequest()

4条回答
  •  北荒
    北荒 (楼主)
    2020-11-30 00:54

    Well, I didn't actually find what IIS setting is responsible, but I've overridden it in Application_PreRequestHandlerExecute() and it finally worked:

    Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB");
    

提交回复
热议问题