Datetime Issue while deploying Sitefinity 3.7 sp2 website on

Posted by Community Admin on 05-Aug-2018 12:05

Datetime Issue while deploying Sitefinity 3.7 sp2 website on local system.

All Replies

Posted by Community Admin on 17-Nov-2012 00:00

Hi,

I am trying to deploy a website (developed in Sitefinity 3.7 sp2) to IIS7 in my local system.
But first, it takes too much time to send any response back.
And the Response returned is:

String was not recognized as a valid DateTime.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.FormatException: String was not recognized as a valid DateTime.
 
Source Error:
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
 
Stack Trace:
 
 
[FormatException: String was not recognized as a valid DateTime.]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +4579906
   Telerik.Cms.Web.UI.DateTimeLiteral.set_Text(String value) +90
   Telerik.Cms.Engine.WebControls.Design.Settings.TextSettingService.ApplySettings(ContentView sender, BaseSettingValue settingValue, Control container) +654
   Telerik.Cms.Engine.WebControls.ContentView.ApplyModeSettings(List`1 settings, Control container) +214
   Telerik.Cms.Engine.WebControls.ContentView.repeater_ItemDataBound(Object sender, RepeaterItemEventArgs e) +621
   System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +693
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +68
   Telerik.Cms.Engine.WebControls.ContentView.CreateChildControls() +4520
   Telerik.News.WebControls.NewsView.CreateChildControls() +24
   System.Web.UI.Control.EnsureChildControls() +146
   System.Web.UI.Control.PreRenderRecursiveInternal() +61
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394

Following is the data in sitefinity.log (in App_data folder):


17-11-2012 14:28:54 [UNKNOWN]
************************************************************************************
ID: 615ff158-b61b-4e24-ab14-61867a66e5de; Code: 3001; Occurrence: 1; Sequence: 6
------------------------------------------------------------------------------------

Application information:
Machine name: ASSET71-PC
OS Version: Microsoft Windows NT 6.1.7600.0
Product Version: 3.7.2057.220
Application Path: D:\Demo\testparking\
Debug: False

Process information:
Process ID: 4852
Process Name: w3wp

Request information:
Request URL: /testPark/en/home.aspx
Rewrite URL: 192.168.1.63/.../cmsentrypoint.aspx
Url Referrer: Is Authenticated: False
Authentication Type:
User:
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
User Address: 192.168.1.150

Variables:
Sitefinity.UrlChahged: True
Sitefinity.RewritePathAnyway: True
CmsHttpRequest: /testPark/home.aspx
AspSessionIDManagerInitializeRequestCalled: True
SF_Crawler: False
cmscurrcult: en
cmsurlcontext: home
cmspageid: a8dff4ba-e5ed-4459-99a9-db2cebd7c2ba
RadControlRandomNumber: 0

- L0 -------------------------------------------------------------------------------

Exception Type: System.Web.HttpException

Message: Request timed out.

Source:

Stack Trace:

------------------------------------------------------------------------------------



17-11-2012 14:31:53 [UNKNOWN]
************************************************************************************
ID: 07ced6e3-97f0-4621-a462-11cbe64b7a4d; Code: 3005; Occurrence: 1; Sequence: 7
------------------------------------------------------------------------------------

Application information:
Machine name: ASSET71-PC
OS Version: Microsoft Windows NT 6.1.7600.0
Product Version: 3.7.2057.220
Application Path: D:\Demo\testparking\
Debug: False

Process information:
Process ID: 4852
Process Name: w3wp

Request information:
Request URL: /testPark/en/about/contact-us.aspx
Rewrite URL: 192.168.1.63/.../cmsentrypoint.aspx
Url Referrer: Is Authenticated: False
Authentication Type:
User:
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
User Address: 192.168.1.150

Variables:
Sitefinity.UrlChahged: True
Sitefinity.RewritePathAnyway: True
CmsHttpRequest: /testPark/about/contact-us.aspx
AspSessionIDManagerInitializeRequestCalled: True
SF_Crawler: False
cmscurrcult: en
cmsurlcontext: Contact Us
cmspageid: ef3c452e-790b-4d74-978c-5bf574eb77df
RadControlRandomNumber: 0

- L0 -------------------------------------------------------------------------------

Exception Type: System.FormatException

Message: String was not recognized as a valid DateTime.

Source: mscorlib

Stack Trace:
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at Telerik.Cms.Web.UI.DateTimeLiteral.set_Text(String value)
at Telerik.Cms.Engine.WebControls.Design.Settings.TextSettingService.ApplySettings(ContentView sender, BaseSettingValue settingValue, Control container)
at Telerik.Cms.Engine.WebControls.ContentView.ApplyModeSettings(List`1 settings, Control container)
at Telerik.Cms.Engine.WebControls.ContentView.repeater_ItemDataBound(Object sender, RepeaterItemEventArgs e)
at System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource)
at System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e)
at Telerik.Cms.Engine.WebControls.ContentView.CreateChildControls()
at Telerik.News.WebControls.NewsView.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
------------------------------------------------------------------------------------

Posted by Community Admin on 22-Nov-2012 00:00

Hi Ashish,

I have responded in your support thread already. 

Regards,
Jen Peleva
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 01-May-2013 00:00

We're having the same problem after transferring a Sitefinity 3.7 site from Windows Server 2003 to Windows Server 2008.
Can you share with us your solution?

Thanks.

Posted by Community Admin on 01-May-2013 00:00

Got this solved, actually.

Thanks.

Posted by Community Admin on 02-May-2013 00:00

Hi Chanan ,

 I'm glad you were able to fix the problem!

All the best,
Jen Peleva
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 06-Sep-2013 00:00

Hmmmmmmmm could someone post their solution? Don't really enjoy threads which say 'answer is 'somewhere else'' and especially those 'oh i solved it' ones.....

Posted by Community Admin on 06-Sep-2013 00:00

Server 2012, IIS 8.0.9200.16384.

[FormatException: String was not recognized as a valid DateTime because the day of week was incorrect.]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +14295786
   Telerik.Cms.Web.UI.DateTimeLiteral.set_Text(String value) +105
   Telerik.Cms.Engine.WebControls.Design.Settings.TextSettingService.ApplySettings(ContentView sender, BaseSettingValue settingValue, Control container) +816
   Telerik.Cms.Engine.WebControls.ContentView.ApplyModeSettings(List`1 settings, Control container) +228
   Telerik.Cms.Engine.WebControls.ContentView.repeater_ItemDataBound(Object sender, RepeaterItemEventArgs e) +1054
   System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +199
   System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +659
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +164
   Telerik.Cms.Engine.WebControls.ContentView.CreateChildControls() +4309
   System.Web.UI.Control.EnsureChildControls() +189
   System.Web.UI.Control.PreRenderRecursiveInternal() +60
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4297

Posted by Community Admin on 06-Sep-2013 00:00

Hey all, I've figured this out also (atleast narrowed down the issue)...

But

This is coming from the BlogPosts control. I've managed to get the BlogPosts to work by disabling the use of the DateTime display for list items. I can rebreak the control by using the 'Display DateTime' on list items, and I've tried various formats, but since it's a parser error either the issue lies in the server 2012 (... this project works with server2003)

Current Steps Taken
I'd like to suggest to all just go to /sitefinity, find your page and
start removing components. Likely you will see what control is throwing
this error because the exceptions are kept in the scope of the control.
Time for some debugging.

Posted by Community Admin on 23-Sep-2013 00:00

Please, there are 2 people who've solved this. Can someone please post their solutions?

I have the same problem.
If I deploy this on Server 2003, the page and BlogPosts control displays OK. On server 2012 the page gives me String was not recognized as a valid DateTime because the day of week was incorrect
I can disable the 'Display dateTime for items in the list', and the page is ok. But if I enable this, it fails. I've tried also some different formats but all fail.

PLEASE DON'T POST 'I've responded in your support ticket' or please include a reference for the solution. These threads should be deleted if they contain nothing....

Frustrated
Richard

Posted by Community Admin on 23-Sep-2013 00:00

Progress,
It appears that the datetime format used by asp.net is different. 
If you create a blank page with this line, you will see the difference between servers.

        Response.Write(DateTime.Now);

Server 2003 
23/09/2013 11:48:57 AM
Server 2012
2013-09-23 11:53:54 AM

Need a link on how to change this in IIS? Can someone link this if found?

Posted by Community Admin on 23-Sep-2013 00:00

SOLVED. And here's the answer. 
Our webconfig had the globalization culture as 'en-CA' (well... we're Canucks.... we play hockey, while drinking beer, I just changed a dog because it was flat on my dog sled, and I'm putting in a SunRoof in my igloo).

The control now displays properly with this change
    <system.web>
        <globalization culture="en-US" uiCulture="en" />

Hope this saves someone time

This thread is closed