Maybe here is not the correct place to post this question. Any suggestion
that which newsgroup I should put ?
Thanks
"Frank" wrote:
[color=blue]
> Code runs good on other servers. But here is the code:
>
> Response.AddHeader("Content-Type", "application/csv")
> Response.AddHeader("Content-Disposition",
> "attachment;filename=" + fileName + ";")
>
> Dim Fs As FileStream = New FileStream(Server.MapPath("~/" &
> fileName), FileMode.Open)
> Dim FileSize As Long = Fs.Length
> Dim bBuffer() As Byte = New Byte(FileSize) {}
> Fs.Read(bBuffer, 0, Convert.ToInt32(FileSize))
> Fs.Close()
>
> Response.BinaryWrite(bBuffer)
> Response.Flush()
> Response.Close()
>
> Thanks,
> Frank
> "Daniel Fisher(lennybacon)" wrote:
>[color=green]
> > What about posting some code ...
> >
> > --
> > Daniel Fisher(lennybacon)
> >
http://www.lennybacon.com
> >
> >
> > "Frank" <Frank@discussions.microsoft.com> wrote in message
> > news:E2A89F95-9B8F-4140-A058-5030B0FB0E75@microsoft.com...[color=darkred]
> > > Hi,
> > > On one of my server, downloading file by clicking a button give empt
> > > file. On the other servers work perfectly. Is any idea ? What should be
> > > change in IIS Metabase setting?
> > > After click the button on an aspx page, IE prompts the users whether they
> > > want to open, save or cancel the download with correct name. No matter
> > > click
> > > open or save, it started download and transfered 0 byte. I checked the
> > > server
> > > side it did created the file with correct contents. The code is same as
> > > those
> > > many posted here.
> > > Thanks in advance.
> > > Frank
> > >[/color]
> >
> >
> >[/color][/color]