0

I am migrating an application to .net core and got some errors here:

enter image description here

The error says HttpResponse does not contain a definition for (each of these AddHeader, BufferedOutput and BinaryWrite) and no extension method accepting first argument ... could be found. I've tried a couple of options from StackOverflow but none working for me for now.

How do you solve this in .net core?

Stam
  • 2,410
  • 6
  • 32
  • 58
bdfios
  • 657
  • 6
  • 17
  • 29
  • For adding headers you can try: `context.Response.Headers.Add("content-disposition", "attachment");` – Stam May 24 '19 at 17:34
  • 1
    Thank you @Stam. That works for the AddHeaders – bdfios May 27 '19 at 11:36
  • this post seems related to what you are looking for. https://stackoverflow.com/questions/43178149/httpresponse-does-not-contain-a-definition-for-addheader-for-dot-net-core – user14181068 Sep 25 '20 at 09:40

0 Answers0