Response.TransmitFile не работает

Response.TransmitFile, но файл не загружается, отсутствует ошибка JavaScript, код исключения не выполняется без проблем.

Dim FilePath As String = Functions.DecryptString(HttpUtility.UrlDecode(Request.Form("filepath")).Replace(" ", "+"), Settings.UrlEncryptionKey, Settings.UrlEncryptionVecotor).ToString()
    Dim FileName As String = Request.Form("filename")
    Dim CompletePath = Settings.WebSiteResourcePhysicalPath & FilePath & FileName

    If IO.File.Exists(CompletePath) Then
        Response.Clear()
        Response.AppendHeader("content-disposition", "attachment; filename=" + FileName)
        Response.ContentType = "Application/octet-binary"
        Response.TransmitFile(CompletePath)
        Response.End()
        Response.Flush()
    End If

скопируйте и вставьте "CompletePath", и файл также там. Помогите мне, пожалуйста

0 ответов

Другие вопросы по тегам