Click here to Skip to main content
15,889,266 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to extract links from a webpage using mshtml Pin
benzite7-May-03 21:41
benzite7-May-03 21:41 
GeneralRe: How to extract links from a webpage using mshtml Pin
Stephane Rodriguez.7-May-03 21:58
Stephane Rodriguez.7-May-03 21:58 
GeneralRe: How to extract links from a webpage using mshtml Pin
benzite7-May-03 22:25
benzite7-May-03 22:25 
AnswerRe: How to extract links from a webpage using mshtml Pin
Stephane Rodriguez.6-May-03 22:36
Stephane Rodriguez.6-May-03 22:36 
General<mailto> in C# Pin
eggie56-May-03 15:02
eggie56-May-03 15:02 
GeneralRe: in C# Pin
J. Dunlap6-May-03 15:35
J. Dunlap6-May-03 15:35 
GeneralAll in Code Behind. . . . Pin
drewpecunia6-May-03 13:38
drewpecunia6-May-03 13:38 
GeneralWebRequest is not working Pin
IsaacB6-May-03 12:48
IsaacB6-May-03 12:48 
I have a web form that uses a WebRequest object in order to get the binary content from an .aspx

so the .aspx makes a Response.BinaryWrite and outputs a bunch of bytes

however I have the following code

WebRequest request = WebRequest.Create(serverRequest);
WebResponse response = request.GetResponse();

if (response.ContentLength > 0)
{
using (FileStream fs = new FileStream
(filePath,FileMode.Create, FileAccess.Write))
{
byte[] buffer = new byte[response.ContentLength];
response.GetResponseStream().Read(buffer, 0,
buffer.Length);

fs.Write(buffer, 0, buffer.Length);
fs.Flush();
fs.Close();
}
}

when the file is saved, the size of the file is correct, however the content is not, most of the bytes dont arrive

anybody has any idea about why?

the .aspx outputs sometimes 2.5 MB, im not sure if size is causing the problem

Basically the idea of what I'm trying to do is get the binary response from an .aspx from a winform, and then save it in a file

Thanks
GeneralRe: WebRequest is not working Pin
leppie7-May-03 7:01
leppie7-May-03 7:01 
GeneralNetworkStream: To buffer, or not to buffer... Pin
Katalyst6-May-03 12:14
Katalyst6-May-03 12:14 
QuestionIHTMLEditHost sample for C#? Pin
J. Dunlap6-May-03 10:22
J. Dunlap6-May-03 10:22 
AnswerRe: IHTMLEditHost sample for C#? Pin
Stephane Rodriguez.6-May-03 11:30
Stephane Rodriguez.6-May-03 11:30 
GeneralRe: IHTMLEditHost sample for C#? Pin
J. Dunlap6-May-03 13:01
J. Dunlap6-May-03 13:01 
QuestionHow to get the IP Number of the server on which my app is running Pin
Ranjan Banerji6-May-03 9:20
Ranjan Banerji6-May-03 9:20 
AnswerRe: How to get the IP Number of the server on which my app is running Pin
Rama Krishna Vavilala6-May-03 9:31
Rama Krishna Vavilala6-May-03 9:31 
GeneralRe: How to get the IP Number of the server on which my app is running Pin
Ranjan Banerji6-May-03 9:54
Ranjan Banerji6-May-03 9:54 
GeneralRe: How to get the IP Number of the server on which my app is running Pin
Ranjan Banerji6-May-03 10:24
Ranjan Banerji6-May-03 10:24 
AnswerRe: How to get the IP Number of the server on which my app is running Pin
Vasudevan Deepak Kumar7-May-03 1:54
Vasudevan Deepak Kumar7-May-03 1:54 
GeneralRe: How to get the IP Number of the server on which my app is running Pin
Ranjan Banerji7-May-03 3:45
Ranjan Banerji7-May-03 3:45 
GeneralRe: How to get the IP Number of the server on which my app is running Pin
Vasudevan Deepak Kumar7-May-03 3:59
Vasudevan Deepak Kumar7-May-03 3:59 
GeneralRe: How to get the IP Number of the server on which my app is running Pin
Ranjan Banerji7-May-03 11:17
Ranjan Banerji7-May-03 11:17 
GeneralForm Design Quandries Pin
RB@Emphasys6-May-03 7:54
RB@Emphasys6-May-03 7:54 
GeneralRe: Form Design Quandries Pin
Stephane Rodriguez.6-May-03 9:07
Stephane Rodriguez.6-May-03 9:07 
GeneralRe: Form Design Quandries Pin
RB@Emphasys6-May-03 9:12
RB@Emphasys6-May-03 9:12 
GeneralRe: Form Design Quandries Pin
RB@Emphasys6-May-03 9:21
RB@Emphasys6-May-03 9:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.