Just a quick reminder to myself, so that I can forget about it...
Fiddler can act as a man-in-the-middle and decrypt SSL traffic, but then System.Net.Security rightfully complains about an invalid remote certificate ("The remote certificate is invalid according to the validation procedure."). This results in a System.Net.WebException "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.".
To prevent this from happening:
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
Just be sure to not include this in production code :-)
(This post triggered by receiving a lovely screen dump of a message box. A message box covering almost the complete screen, and containing lots of serialized XML. XML containing lots of entitified HTML...)
CMD.exe
does not allow changing the current directory to a UNC path. If you try, it complains that "CMD does not support UNC paths as current directories.".
PUSHD
to the rescue:
C:\\> pushd \\\\serendipity\\D$
Z:\\>
Do something here with the files on Z:
Z:\\> popd
C:\\> _
PUSHD
temporarily maps a drive letter to the specified UNC share (starting from Z:
on down until it finds one that's available). Until you call POPD
, you can access the share via that drive letter (also from other DOS boxes and Windows Explorer).
Sure beats mapping and unmapping shares all the time, but keep in mind that the PUSHD
trick only works if you don't need to specify credentials to access the share.