.NET: String was not recognized as a valid DateTime

Questions about the WURFL Cloud service.
cspace
Posts: 3
Joined: Tue Feb 25, 2014 10:10 am

.NET: String was not recognized as a valid DateTime

Postby cspace » Tue Feb 25, 2014 10:14 am

Hello,

We're using the .NET API. Sometimes, when we hit CloudClientManager.GetDeviceInfo(HttpContext), we get this exception:

Code: Select all

System.FormatException: String was not recognized as a valid DateTime
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at ScientiaMobile.WurflCloud.Cache.CookieWurflCloudCache.GetDevice(HttpContextBase context)
at ScientiaMobile.WurflCloud.Http.CloudClient.SendRequest(HttpContextBase context, String url, Boolean uaMayBeDifferent)
We believe this is due to the user's thread being in a special culture, such as Russian, and the date strings in that culture are not aligning with what your code expects.

However, as we can't see the source, we're just guessing.

We know we've seen this in ru-RU, but we think we've observed it in other cultures as well, including seemingly en-US.

Can you provide more information on what DateTime you're parsing, what formatinfo you're using to do the parse? Is there a fix on your end where you could use the invariant culture?

Thanks for any help.

Elliotfehr

Re: .NET: String was not recognized as a valid DateTime

Postby Elliotfehr » Tue Feb 25, 2014 5:14 pm

Hello,

We have our .NET engineers looking into this along with your other forum post at the moment and we will let you know as soon as there is an update. Thank you for your patience.

Elliot

Elliotfehr

Re: .NET: String was not recognized as a valid DateTime

Postby Elliotfehr » Wed Feb 26, 2014 10:29 am

Hello,

I am going to email you an updated cloud client for you to try out that should fix the issue that you are having. Feel free to let me know if the issue persists.

Thank you,

Elliot

cspace
Posts: 3
Joined: Tue Feb 25, 2014 10:10 am

Re: .NET: String was not recognized as a valid DateTime

Postby cspace » Mon Mar 10, 2014 11:01 am

Hi!

We released this patch to production this morning and have actually seen a big uptick in this exception in our logs after deploying the patch. Is there any information that we can send to you to help you guys debug the issue further?

Elliotfehr

Re: .NET: String was not recognized as a valid DateTime

Postby Elliotfehr » Fri Mar 14, 2014 10:28 am

Hello,

I wanted to check in with you to see if the builds that we sent over to you earlier in the week to debug this issue worked?

Thank you,

Elliot

uci2i
Posts: 7
Joined: Thu Nov 21, 2013 10:17 am

Re: .NET: String was not recognized as a valid DateTime

Postby uci2i » Mon Mar 24, 2014 12:26 pm

Hi,
we're seeing this error too.
We can recreate it by changing the browser culture, so we assume it's due to dates being stored (cookie?) in 1 format and then read in another.

Is there an updated version we can try?
Thanks

Elliotfehr

Re: .NET: String was not recognized as a valid DateTime

Postby Elliotfehr » Mon Mar 24, 2014 2:02 pm

uci2i,

I just sent you an email with a possible patch for this issue. Feel free to let me if this does not solve the issue for you.

Thank you,

Elliot


Who is online

Users browsing this forum: No registered users and 7 guests