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 4387
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*********@gm ail.comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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.AddHea der?
>
Thanks for your help
:)
Yes it is response.addHea der i am trying to use
the code is
Response.AddHea der "content-disposition",
"attachment;fil ename="&origina lFileName
Response.Conten tType = contentType
the variable contentType and originalFileNam e 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*********@gm ail.comwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Yes it is response.addHea der i am trying to use
the code is
Response.AddHea der "content-disposition",
"attachment;fil ename="&origina lFileName
Response.Conten tType = contentType
the variable contentType and originalFileNam e 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 originalfilenam e 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.conten tType = 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*********@gm ail.comwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Yes it is response.addHea der i am trying to use
the code is
Response.AddHea der "content-disposition",
"attachment;fil ename="&origina lFileName
Response.Conten tType = contentType
the variable contentType and originalFileNam e 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 originalfilenam e 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.conten tType = 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*********@gm ail.comwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
I am passing the content type and the originalfilenam e 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.conten tType = 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*********@gm ail.comwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Yes it is response.addHea der i am trying to use
>
the code is
>
Response.AddHea der "content-disposition",
"attachment;fil ename="&origina lFileName
Response.Conten tType = contentType
>
the variable contentType and originalFileNam e 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 !")> Public
Function GetRandomImage() As Byte()
I then have a test application (with a web reference to my web service)
which has the following code:
Public Class BinaryWebServiceTest
|
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
Response.TransmitFile) to put the file into the response..
My trouble is with a Zip file.. The user gets propmpted to Open or Save
etc.. If they clicks save, the file saves just fine.. no problem... If
they click Open, their Zip program will open,...
|
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 = "test/plain";
Response.OutputStream.Write(buffer, 0, buffer.Length);
Response.End();
|
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 browser displays
or offers to save the binary file instead.
I would like to have the browser accept and display the revised HTML
code as well as offering to open or save the attached file. This
SHOULD be possible using a multipart MIME format -...
|
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 corrupted. The had
not been a problem before but it seems to have been introduced when I
refactored the writing to the response to a buffered version to prevent
potential OutOfMemoryExceptions (you wouldn't believe the size of some
of these...
| |
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 very simple, there is a folder of files with numeric names.
The real file name is stored in the database. User clicks on link that
executes script and provides database record id. Record is looked up,
file name is found, and browser is delivered...
|
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.
I get the same response with:
Response.ContentType="Application/X-unknown" which is more understandable.
The Response.ContentType="Application/pdf" doesn't seem to tell the browser
|
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. I have actually saved the
file returned by IE 7 as a text file and opened it in notepad, so I have
confirmed that it is indeed the page master being returned. The code is in
the code behind file for the aspx page and is called directly from a...
|
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 send them to Response. I
have done this with images by reading them into a Bitmap object and then
using the following code:
Response.ClearContent()
Response.ContentType = "image/gif"
mybitmap.Save(Response.OutputStream, ImageFormat.Gif)
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |