I’m trying to call a WCF JSON service with HttpWebRequest
http://localhost/WCFService/class/sessions?startdate=\\/Date({0})\\/&endDate=\\/Date({1})\\/
This is my call
The value for the Dates is DateTime.Now.Ticks
The trace tells me “String was not recognized as a valid DateTime”.
I have tried not to escape the date, but still same result.
The format for
DateTimevalues in the URI string is any format which can be recognized byDateTime.Parse. Something likestartDate.ToString("yyyy-MM-dd")works out fine.