Hire

.lt

Tiklso link

ASPX download file from server to client get error - Upwork

Būsena UŽDARYTA
Biudžetas 501-1000 Eur
Sukurta: 2019-03-19
Baigiasi: 2019-03-26
Siūlo: Nėra
Apibūdinimas: The developer is required to fix the download feature for ASPX VB code. Currently the code is implemented but when click download the page show error.


The developer shall be familiar with ASPX VB code to perform download.


            Dim file As System.IO.FileInfo = New System.IO.FileInfo(filePath)

            If file.Exists Then

                'Response.Clear()

                'Response.AddHeader("Content-Disposition", "attachment; filename=" & file.Name)

                'Response.AddHeader("Content-Length", file.Length.ToString())

                'Response.ContentType = "application/octet-stream"

                'Response.WriteFile(file.FullName)

                'Response.End()

                'HttpContext.Current.ApplicationInstance.CompleteRequest()


                Dim client As WebClient = New WebClient()

                Dim buffer As Byte() = client.DownloadData(path)

                Response.ContentType = "application/octet-stream"

                Response.AddHeader("content-length", buffer.Length.ToString())

                Response.BinaryWrite(buffer)

            Else

                Response.Write("This file does not exist.")

            End If

Budget: $50

Posted On: March 19, 2019 05:00 UTC
Category: Web, Mobile & Software Dev > Web Development

Skills: ASP.NET, VB.NET
Country: Malaysia
click to apply

Darbo Tipas(ai):
  • PHP
  • CSS
Duomenų Bazė:
Operacinė Sistema: Linux
Siūlymų Skaičius: 0
Siūlosi Žinutės Kaina Trukmė Įvertinimas Informacija