I am running DNN 4.3.4 on WinXP attached to an SQL 2000 database. I created a module that stores images and flash documents as blob data.
When the user is authenticated, the data is displayed as one might expect; however, an unauthenticated user cannot see the data. An unauthenticated user only sees the alternate text of the image tag.
Here is a code snipit from my module that shows how the image tag is created. This particular line of code came out of my ItemDataBound event for my DataList control.
String
.Format("<img src={0} alt={1} border=0>", EditUrl("ItemID", ((DataItemInfo)e.Item.DataItem).ItemID.ToString(), "ImageViewer"), ((DataItemInfo)e.Item.DataItem).FileName);
For those VBers out there the single line above might look something like this to you.
Dim ItemSrc as String
Dim AlternateText as String
Dim ItemInfo as DataItemInfo
ItemInfo = CType(e.Item.DataItem, DataItemInfo)
ItemSrc = EditURL("ItemID", ItemInfo.ItemID.ToString(), "ImageViewer")
AlternateText = ItemInfo.FileName
"<img src=" & ItemSrc & " Alt=" & AlternateText & " border=0>"
The image viewer control simply performs the binarywrite of the byte buffer. So there is really nothing trick about my image handling. I have been using this method for displaying blob data for a long time, and never had any problems in my 1.x .NET environments. I am guessing that 2.x .NET environment does something a little different. So does anyone have a clue?
TIA,
John