Last post Aug 21, 2008 01:46 AM by russell786
Aug 19, 2008 11:53 PM|renuga|LINK
Hi, I have created a new website which displays an image and hosted in IIS that works fine, but when i try to capture the url using httpwebrequest and httpwebresponsethe image is not displayed.
herewith given the code also
string url = "http://172.18.51.143/imagetestsample/image/Backgr1.jpg"; //url of the application hosted in IIS
System.Net.WebProxy pro = new System.Net.WebProxy("172.18.0.18", 8080);
pro.Credentials = CredentialCache.DefaultCredentials;
System.Net.HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
HttpWebRequest.DefaultWebProxy = pro;
System.Net.HttpWebResponse resp = (System.Net.HttpWebResponse)req.GetResponse();
StreamReader rd = new StreamReader(resp.GetResponseStream());
can anyone help me by suggesting how to display the image.
problem displaying image using httpwebresponse
Aug 21, 2008 01:46 AM|russell786|LINK
because original image bytes are not coming... only the image url is coming through the response..