Reputation: 55
I have an issue that is quite confusing for me and was hoping somebody might have some helpful information.
I have a Silverlight 4 app running on Azure (latest SDK). The Silverlight is a typical application using WCF Data Service calls to get and write data to a database. This all works fine on a PC. However, when running on a Mac, any browser, it works for 95% of the application. However, there is one piece that does not work.
My Silverlight application takes information entered into a form, formats a WCF Data Service call to get a record count from a Lucene Index file. The service gets the index count, packages it into one of my defined entities (using the Visual Studio Entity Data Model) and sends the object back from the service to the Silverlight application. The problem though is that it is not returning the correct number. My debugging seems to indicate a 0 is being returned. Again, it only does this for a Mac. The correct number is returned for any browser on any PC. Again, on top of that every other web service call I make from my Silverlight application is returning correctly on the Mac.
Does anybody have any ideas as to what might be happening? Please ask if I have left out any detail.
Thanks
Upvotes: 2
Views: 241
Reputation: 55
Wanted to update with my solution in case anybody else ever runs into a similar issue.
Data from two of the fields on the form are dates (start and end dates to be specific). I was reading these values, extracting the year and then creating my own DateTime object. This is where the problem occurred. It appears Mac Silverlight formats the DateTime object differently than the PC Silverlight. The PC Silverlight was formatted correctly (1/1/2011 0:00:00) whereas the Mac Silverlight formatted incorrectly (1/1/11 12:00:00 AM -5:00) based on my time zone.
My solution was to format the date myself into a string as it needed to eventually be in string format for passing to the Web Service that queried my Lucene indexn anyway.
Upvotes: 2