Questions tagged [response.addheader]

Adds an HTTP Header to an output stream.

17 questions
7
votes
1 answer

How to implement ResponseBodyAdvice to all controllers?

I have a requirement to edit my HttpResponse to add header value. I was searching for single point to implement it and found that ResponseBodyadvice would be helpful. But both methods That overrode in my new class was never called. Could you please…
Ultimata
  • 71
  • 1
  • 1
  • 5
4
votes
1 answer

Response.Headers.Add() vs Response.AddHeader()

I was using Response.Header.Add() before I notice that my code might run on server set in classic mode. In such a case, the exception "This operation requires IIS integrated pipeline mode." is raised. I switched to Response.AddHeader() to solve my…
NLemay
  • 2,331
  • 3
  • 29
  • 45
3
votes
2 answers

FileStream can't access the file because it's being used by another process

I'm new at web app in ASP.NET and I came across this problem. I have a page whe there is a Button to download a template.xls that is previously stored at a SharePoint page. I have the download method and it's working just fine. The template in…
2
votes
2 answers

How can I add a header value to response using unfiltered netty, how write code?

I response a stream, and I want add headerName fileName to response's header. But I don't wirte? req.respond(CharContentType("text/csv") ~> ResponseBytes(xxxxx.usersExport)) I know a Header.scala…
zhaoyou
  • 308
  • 4
  • 19
1
vote
1 answer

Another Update Panel problem ASP.NET

This is a branch off of my other question here I am now able to add my javascript in asynchronously but it does not redirect my page properly. Currently I use this to redirect my page Response.AddHeader("Refresh", "1;URL=mypage.aspx") The reason I…
Jamie Taylor
  • 3,500
  • 21
  • 65
  • 99
1
vote
0 answers

okhttp returns null response

```protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main3); ctx=getApplicationContext(); txtString= (TextView)findViewById(R.id.txtString); httpClient =…
Sara
  • 11
  • 4
1
vote
0 answers

After File Download Refresh or Redirect to the same page in c#

Please Help me how to Refresh or Redirect to the same page after downloading a file using c# code Please find the code I am using in c#. I am used Below code also some time to check but not worked. Please give me the solution to refresh a page…
1
vote
0 answers

Headers are missing in email

Thanks for the prompt information for the queries posted. Herez the problem am facing. Am trying to send an email. I want to add my custom headers. From outlook when am seeing the headers are missing // Recipient's email ID needs to be…
nsarvesh
  • 37
  • 1
  • 2
  • 9
1
vote
1 answer

Response.AddHeader not working in IE

I have a problem when I use Response.AddHeader. Firefox and Chrome work fine (They show the popup and download the file), but not in IE, where it only opens a blank popup and not do anything like download a file or show a prompt. The popup title is…
0
votes
1 answer

How to open a new tab with response.addheader?

I am wondering how to open a new tab with the following bit of code. Using "Inline" instead of attachment will open the pdf in the current window. By using "attachment", a Save box opens and download the pdf. I don't want to do either. I want the…
Laurence
  • 7,633
  • 21
  • 78
  • 129
0
votes
1 answer

Problem with authorization to COINAPI REST API with custom header and key in R

I would like to connect to COINAPI resources. They provide two types of authorization. https://docs.coinapi.io/#authorization Custom authorization header named X-CoinAPI-Key Query string parameter named apikey When I am using the first method, it…
0
votes
2 answers

Is it possible to add 2 distinct Content-Disposition headers in the following way

oResponse.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName_DBText, Encoding.UTF8).Replace("+", "%20")); oResponse.AddHeader("Content-Disposition", "inline=" + HttpUtility.UrlEncode(fileName_DBText,…
Terry Delahunt
  • 616
  • 4
  • 21
0
votes
0 answers

How to use Add Responseheader to download file to the server side?

I'm using Response.AddHeader to generate an Excel file. This works fine if I want to send the file to the user's browser as a download. Is it possible to use Response.AddHeader to save the file to directory on the server? I need to send to send the…
0
votes
1 answer

How to make a server.transfer() with a Response.AddHeader("refresh", "seconds") and not get a 404 error?

so this is the scenario: I have a base class for all login-controlled pages: public class SessionControlledPage : Page { protected virtual void Page_Load(Object sender, EventArgs e) { Response.AddHeader("Refresh",…
Andres A.
  • 1,329
  • 2
  • 21
  • 37
0
votes
2 answers

Response.AddHeader

When is Response.AddHeader used?
Novice Developer
  • 4,489
  • 11
  • 39
  • 42
1
2