Geeks With Blogs
Sharvan Dhaka blog
this code snippet read the respone fo a web request through binary reader
 
private byte[] getByte(string URL)
{
HttpWebRequest wrGETURL = (HttpWebRequest)WebRequest.Create(URL);
System.Net.HttpWebResponse webresponse = (HttpWebResponse)wrGETURL.GetResponse();
string ct = webresponse.ContentType;
Stream objStream = webresponse.GetResponseStream();
BinaryReader breader = new BinaryReader(objStream);
byte[] buffer = breader .ReadBytes((int)webresponse.ContentLength);
return buffer;
}
Posted on Sunday, October 15, 2006 5:57 PM Asp.net , Tricky Solution/ Code | Back to top


Comments on this post: Read Response of a web request in a byte Array with C# Asp.net

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Sharvan Dhaka | Powered by: GeeksWithBlogs.net