Author: werD | Posted on: 7/22/2010 11:10:15 PM | Views : 360

Im trying to allow access to resources(jpg, mp3, wmv, pdf, etc) on some internal servers whether the user(usually me) is on the local network or not by using a webrequest/httpwebresponse and then forwarding the returned stream to the output of the page.

EDIT SOLVED(enough)
Using the below code I can return data and the appropriate content type . Images are displaying as expected, but I just tried the same thing with an mp3 and it made windows media player open as expected but I got an error stating wmp cannot play the file.

Do I need to force a download or is there something wrong with the logic when mp3s are involved?

Thanks in advance

WebRequest request = WebRequest .Create("http://ip-to-internally-accessible-server/an-image.jpg"); //seems to work ...

Go to the complete details ...