我創建了一個視圖,使用Servicestack.Razor.在視圖頁上,我試圖使用下面的代碼獲取會話。System.TimeZoneNotFoundException在ViewPage上使用ServiceStack.Razor
var session = GetSession<AuthUserSession>().ToJson();
當我把這個代碼視圖頁面上,我得到以下錯誤:
System.TimeZoneNotFoundException
Exception of type 'System.TimeZoneNotFoundException' was thrown.
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): mscorlib.
堆棧跟蹤是如下:
Exception stack trace:
at System.TimeZoneInfo.get_Local() [0x00000] in <filename unknown>:0
at ServiceStack.Text.Common.DateTimeSerializer..cctor() [0x00000] in <filename unknown>:0
這是Servicestack.Text
的錯誤嗎?我該如何解決這個問題?
注:我在Ubuntu 12.10