Vanwege onderhoudswerkzaamheden die uw ervaring zouden moeten verbeteren, heeft deze website beperkte functionaliteit. Als een artikel uw probleem niet verhelpt en u een vraag wilt stellen, kan onze ondersteuningsgemeenschap u helpen in @FirefoxSupport op Twitter en /r/firefox op Reddit.

Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Meer info

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

How to force Firefox to download a PDF file when serving from a C# server code?

  • 4 antwoorden
  • 1 heeft dit probleem
  • 11 weergaven
  • Laatste antwoord van cor-el

more options

Firefox is opening the PDF within the browser after generating the file. I am using C# and in the response header I use application/octet-stream and I am using attachment. Thank you,

Firefox is opening the PDF within the browser after generating the file. I am using C# and in the response header I use application/octet-stream and I am using attachment. Thank you,

Alle antwoorden (4)

more options

Hi alanderos, The preference is stored in the Firefox profile. It can be changed in the Applications section of the Preferences menu. As for programmatically, I might suggest trying stackoverflow: *Where to go for developer support

more options

What happens when you click this link:

http://www.jeffersonscher.com/res/getpdf.php?f=Mixed_Content_Blocking.pdf

That is served with:

Content-Type: application/pdf Content-Disposition: attachment; filename=Mixed_Content_Blocking.pdf

See: https://support.mozilla.org/questions/971296#answer-479623

more options

Oops, I don't know anything about C#. Stack Overflow or Microsoft's forums would be a good choice.

more options

What does Tools > Page Info > General show when this file is opened in a tab?

When the server sends a file as application/octet-stream then this should make Firefox show the download dialog.