Jun 23, 2009 11:20 AM|jbassett|LINK
I'm trying to pull images from our server but they are written on-the-fly with no extension (like a .jpg or .gif) for instance.
Even if I set the content type like this:
myReq.ContentType = "image/jpg"
...It still fails.
IF I set the content type I get this error:
System.NullReferenceException: Object reference not set to an instance of an object.
If I do not set the content type I get this error:
System.IO.DirectoryNotFoundException: Could not find a part of the path 'd:\imagedirectorytosavein\'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
...But Regardless I always get an error. If I use an image that has a .jpg or .gif after it....no problem.
Thanks for your help.