I give the file to the client from the server:

Dim fileInfo As IO.FileInfo = New IO.FileInfo(file) Response.Clear() Response.ContentType = "application;name=" + fileInfo.Name Response.AppendHeader("Content-Disposition", "attachment; filename=" + fileInfo.Name) Response.AppendHeader("Content-Length", fileInfo.Length.ToString()) Response.WriteFile(file) Response.Flush() 

file - file format .docx .
The browser, as it should be, asks "Save or open the file?". On IE works as it should, but on Opera the file extension changes to .zip .
It is clear that .docx is the same .zip archive, but the file with the .docx extension is sent from the server, why does it change?

    1 answer 1

    This is a feature of the opera, it automatically detects zip-archives and behaves not quite logical.

    • 3
      Far from it, although Opera is not always logical, but this behavior is not its merit. Look what a mess OPA has in Content-Type :-) - karmadro4
    • one
      Indeed, I replaced it with Response.ContentType = "application / msword" and it worked. - Ildar