July 2007 - Posts
If you're trying to set HTTP headers such as If-Modified-Since (to do conditional GET based on the previous request Last-Modified response header, which you should strive to do as much as possible), you may come across this error message.
This happens if you're trying to set these headers through WebRequest.Headers.Set (or Add), when the request instance you got is an HttpWebRequest. This class provides explicit properties to set those values, and what the message is (quite unsuccessfully IMO) trying to tell you is that you should downcast to HttpWebRequest, and set the headers through its properties, such as IfModifiedSince....
Read full article
I've been subconsciously hunt by this statement I made during the last MVP Summit among a bunch of very smart people, specially because I'm pretty sure I was misinterpreted as I didn't have a chance to explain my assertion.
I do care about code documentation, clarity, and self-explaining code. You can tell how much I (and the rest of the development team I worked with) care if you take a look at the source code for the Composite UI Application Block. I frequently use the Documentor extension to VS heavily to help me create nice-looking code comments. I do believe ...
Read full article
Quite some time ago (around XML raise as a universal data format), the W3C seemed to be in doubt of the value of QNames (prefix + local name) in attribute values.
One very clean evidence of this inconsistency around the best practice on QNames on attribute values is the W3C XML Schema specification, which was pretty happy with QNames in attributes:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="my-schema" ...
Read full article
More Posts