A ProtocolViolationException is thrown by descendants of WebRequest and WebResponse to indicate an error using the underlying protocol. For example, the HttpWebRequest and HttpWebResponse classes throw a ProtocolViolationException to indicate an error using HTTP.