Posts Tagged ‘HTTPClient’

Fixing issue with HTTPClient and ProtocolViolationException: The value of the date string in the header is invalid

When you parse a large number of sites / RSS feeds using Microsoft HTTPClient or WebClient you can get an exception :”ProtocolViolationException: “The value of the date string in the header is invalid” This error usually occurs when you try to access LastModified date in a response. var response = (HttpWebResponse)httpRequest.GetResponse(); var lastModified = response.LastModified; […]