Hi,
I am trying to set the content type and header for the response object
but for some reason it doesnt set it. I tried it on dev and it worked
fine but didnot on production. The difference is that dev is http and
production is https. Is there any difference in setting the header and
content type when doing so a http and when on a https server.
Thanks for your help
:) 8 4362
Katie wrote:
[stuff about HTTP headers and SSL]
I can't advise about this specific situation, but a great tool for
debugging stuff like this is Firefox with the Live HTTP Headers
extension installed. http://livehttpheaders.mozdev.org/
Simply hit Alt+L and you'll get a sidebar that pops out. Then browse
the page that's causing trouble and you'll see all the request/response
activity.
"Katie" <Dn*********@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
Hi,
I am trying to set the content type and header for the response object
but for some reason it doesnt set it.
How did you discover that it doesn't set it?
>I tried it on dev and it worked
fine but didnot on production. The difference is that dev is http and
production is https. Is there any difference in setting the header and
content type when doing so a http and when on a https server.
There is no difference. https isn't really a different protocol it is http
over ssl where ssl is at a lower level than http. The http contents
including headers remain intact when sent over ssl.
I take it by Response.Header you meant Response.AddHeader?
>
Thanks for your help
:)
Yes it is response.addHeader i am trying to use
the code is
Response.AddHeader "content-disposition",
"attachment;filename="&originalFileName
Response.ContentType = contentType
the variable contentType and originalFileName are set to the correct
values, i verified that by printing them out. For some reason it takes
the content type as html no matter what and it gives some random text
for the filename
thanks
:)
Katie wrote:
Hi,
I am trying to set the content type and header for the response object
but for some reason it doesnt set it. I tried it on dev and it worked
fine but didnot on production. The difference is that dev is http and
production is https. Is there any difference in setting the header and
content type when doing so a http and when on a https server.
Thanks for your help
:)
Katie wrote:
For some reason it takes
the content type as html no matter what and it gives some random text
for the filename
Can you show us these values please?
"Katie" <Dn*********@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
Yes it is response.addHeader i am trying to use
the code is
Response.AddHeader "content-disposition",
"attachment;filename="&originalFileName
Response.ContentType = contentType
the variable contentType and originalFileName are set to the correct
values, i verified that by printing them out. For some reason it takes
the content type as html no matter what and it gives some random text
for the filename
Printed out from where, how?
What I'm not yet convinced off is how you are seeing the headers aren't what
they should be at the client end?
Is Response.Buffer true or false?
thanks
:)
Katie wrote:
Hi,
I am trying to set the content type and header for the response object
but for some reason it doesnt set it. I tried it on dev and it worked
fine but didnot on production. The difference is that dev is http and
production is https. Is there any difference in setting the header and
content type when doing so a http and when on a https server.
Thanks for your help
:)
I am passing the content type and the originalfilename in the query
string to the page along with other info. It seems like it is taking
the entire querystring as teh filename and not using the
response.contentType = original filename
also response.clear doesnot seem to be working
are there any settings for response headers which may prevent pages
from modifying it>?
thanks
:)
Anthony Jones wrote:
"Katie" <Dn*********@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
Yes it is response.addHeader i am trying to use
the code is
Response.AddHeader "content-disposition",
"attachment;filename="&originalFileName
Response.ContentType = contentType
the variable contentType and originalFileName are set to the correct
values, i verified that by printing them out. For some reason it takes
the content type as html no matter what and it gives some random text
for the filename
Printed out from where, how?
What I'm not yet convinced off is how you are seeing the headers aren't what
they should be at the client end?
Is Response.Buffer true or false?
thanks
:)
Katie wrote:
Hi,
>
I am trying to set the content type and header for the response object
but for some reason it doesnt set it. I tried it on dev and it worked
fine but didnot on production. The difference is that dev is http and
production is https. Is there any difference in setting the header and
content type when doing so a http and when on a https server.
>
Thanks for your help
:)
Katie wrote:
I am passing the content type and the originalfilename in
the query string to the page along with other info. It seems
like it is taking the entire querystring as teh filename and
not using the response.contentType = original filename
also response.clear doesnot seem to be working
are there any settings for response headers which may prevent
pages from modifying it>?
[blink]. Are you *absolutely* certain that Response.Clear() is not clearing
the header you set? You still have not shown any code, BTW.
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
"Katie" <Dn*********@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
I am passing the content type and the originalfilename in the query
string to the page along with other info. It seems like it is taking
the entire querystring as teh filename and not using the
response.contentType = original filename
also response.clear doesnot seem to be working
are there any settings for response headers which may prevent pages
from modifying it>?
I agree with Dave, I'm still struggling to imagine what you are actually
doing. A little bit of code would really help right now.
thanks
:)
Anthony Jones wrote:
"Katie" <Dn*********@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
Yes it is response.addHeader i am trying to use
>
the code is
>
Response.AddHeader "content-disposition",
"attachment;filename="&originalFileName
Response.ContentType = contentType
>
the variable contentType and originalFileName are set to the correct
values, i verified that by printing them out. For some reason it takes
the content type as html no matter what and it gives some random text
for the filename
>
Printed out from where, how?
What I'm not yet convinced off is how you are seeing the headers aren't
what
they should be at the client end?
Is Response.Buffer true or false?
thanks
:)
Katie wrote:
Hi,
I am trying to set the content type and header for the response
object
but for some reason it doesnt set it. I tried it on dev and it
worked
fine but didnot on production. The difference is that dev is http
and
production is https. Is there any difference in setting the header
and
content type when doing so a http and when on a https server.
Thanks for your help
:)
>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Alex Nitulescu |
last post by:
Hi. I have a WebService which provides a webmethod which returns a byte
array representing a picture. The method's signature is:
<WebMethod(Description:="Shows something nice every time !")>...
|
by: jeffpriz |
last post by:
I'm have a situation where I need to put a download link/button on a
page, where the file to be downloaded does not exist on our webservers
.... So I'm using Response.WriteFile (i've also tried...
|
by: Mantorok |
last post by:
Hi all
I have the contents of a text file that I would like to output to the
response stream, however IE thinks it is XML and comes up with and error,
here is the code:
Response.ContentType =...
|
by: john |
last post by:
The standard method to transmit a file from an aspx page to a browser
is to stream the file to the response then end the response. The HTML
code generated by the aspx page is discarded, and the...
|
by: eventuranza |
last post by:
For my application, there users can upload and download files to the a
webserver. Straightforward enough. However, when they upload a PDF
file then try to download it, the file seems to be...
| |
by: mattridings |
last post by:
Hi gang,
Have a script that works fine. However, it's really cpu intensive and
I'm looking for suggestions on a) whether or not that's normal and if
so b)a better way of doing it.
Script is...
|
by: Bjorn Sagbakken |
last post by:
With ASP.NET 2.0
I'm trying to display the pdf file directly in the client browser, but I
only get a download dialogue box. Downloading the file works fine, but I
want to view the PDF directly.
...
|
by: Michael D. Ober |
last post by:
When I single step through the code below, it sends back the PDF file that
is retrieved in the line fm.GetAccountPDF(...). When I run without single
stepping, I get the master page for this page. ...
|
by: Nathan Sokalski |
last post by:
I have an application in which I want to allow users to view certain files
that are on the server, but not part of the application. To do this, I
figured I would have ASP.NET read the files and...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |