473,378 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

output text file with ASP ? Extra headers

Hi all,

On my web page, I have a <OBJECT DATA="mydatafile.ica" ...> which loads
Citrix ICA web client.
The problem is that I want to generate the mydatafile.ica on the fly (e.g.
based on session variables) and pass it to the user. So I was thinking of
doing it this way:

<OBJECT DATA="datafilegen.asp" ...>

Now I need to write a datafilegen.asp ASP page that outputs a plain text
file.
I tried to set Response.ContentType = "text/plain"
However, when I telnet to my server on port 80 to see what actually gets
output, I see these headers:

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Sun, 07 Mar 2004 17:04:39 GMT
X-Powered-By: ASP.NET
Connection: Keep-Alive
Content-Length: 391
Content-Type: text/plain
Set-Cookie: [SNIPPED BY ME]; path=/
Cache-control: private

If I try the same with a text file, I just get the file with no headers
(which is what I need)
Is there a way to turn these headers off? Do I have to set some ASP variable
for that?

-Oleg.
Jul 19 '05 #1
2 3014
Greetings Oleg:

I know nothing of Citrix, but if it's a text file you want to created, you could try something like this:

Sub CreateAfile
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("c:\PrivateFolder\testfile.txt" , True)
MyFile.WriteLine("This is a test.")
MyFile.Close
End Sub

You will have to make sure the IIS user has rights to write into the folder you create this file.

-rwg
This is what I think, not necessarily what is accurate!

--------------------
| From: "Oleg Ogurok" <ol**@ogurok.com.ihatespammers.ireallydo.co>
| Newsgroups: microsoft.public.inetserver.asp.general
| Subject: output text file with ASP ? Extra headers
| Date: Sun, 7 Mar 2004 12:08:51 -0500
| Organization: Posted via Supernews, http://www.supernews.com
| Message-ID: <10*************@corp.supernews.com>
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| X-Complaints-To: ab***@supernews.com
| Lines: 34
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!
newsfeed.news2me.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.inetserver.asp.general:267696
| X-Tomcat-NG: microsoft.public.inetserver.asp.general
|
| Hi all,
|
| On my web page, I have a <OBJECT DATA="mydatafile.ica" ...> which loads
| Citrix ICA web client.
| The problem is that I want to generate the mydatafile.ica on the fly (e.g.
| based on session variables) and pass it to the user. So I was thinking of
| doing it this way:
|
| <OBJECT DATA="datafilegen.asp" ...>
|
| Now I need to write a datafilegen.asp ASP page that outputs a plain text
| file.
| I tried to set Response.ContentType = "text/plain"
| However, when I telnet to my server on port 80 to see what actually gets
| output, I see these headers:
|
| HTTP/1.1 200 OK
| Server: Microsoft-IIS/5.0
| Date: Sun, 07 Mar 2004 17:04:39 GMT
| X-Powered-By: ASP.NET
| Connection: Keep-Alive
| Content-Length: 391
| Content-Type: text/plain
| Set-Cookie: [SNIPPED BY ME]; path=/
| Cache-control: private
|
| If I try the same with a text file, I just get the file with no headers
| (which is what I need)
| Is there a way to turn these headers off? Do I have to set some ASP variable
| for that?
|
| -Oleg.
|
|
|
Jul 19 '05 #2

Thanks Rob. However, I'm trying the opposite, i.e. not to create a text file
on the filesystem but rather generate it in memory, output it to the client
and then discard it.

There is Response.AddHeader but I can't find any method to clear all
headers.

Thanks anyway.
-O
"Rob Greene" <a-****@online.microsoft.com> wrote in message
news:ab**************@cpmsftngxa06.phx.gbl...
Greetings Oleg:

I know nothing of Citrix, but if it's a text file you want to created, you could try something like this:
Sub CreateAfile
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("c:\PrivateFolder\testfile.txt" , True)
MyFile.WriteLine("This is a test.")
MyFile.Close
End Sub

You will have to make sure the IIS user has rights to write into the folder you create this file.
-rwg
This is what I think, not necessarily what is accurate!

--------------------
| From: "Oleg Ogurok" <ol**@ogurok.com.ihatespammers.ireallydo.co>
| Newsgroups: microsoft.public.inetserver.asp.general
| Subject: output text file with ASP ? Extra headers
| Date: Sun, 7 Mar 2004 12:08:51 -0500
| Organization: Posted via Supernews, http://www.supernews.com
| Message-ID: <10*************@corp.supernews.com>
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| X-Complaints-To: ab***@supernews.com
| Lines: 34
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
e.de!npeer.de.kpn-eurorings.net! newsfeed.news2me.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-post-01!supernews.com!
corp.supernews.com!not-for-mail | Xref: cpmsftngxa06.phx.gbl microsoft.public.inetserver.asp.general:267696 | X-Tomcat-NG: microsoft.public.inetserver.asp.general
|
| Hi all,
|
| On my web page, I have a <OBJECT DATA="mydatafile.ica" ...> which loads
| Citrix ICA web client.
| The problem is that I want to generate the mydatafile.ica on the fly (e.g. | based on session variables) and pass it to the user. So I was thinking of | doing it this way:
|
| <OBJECT DATA="datafilegen.asp" ...>
|
| Now I need to write a datafilegen.asp ASP page that outputs a plain text
| file.
| I tried to set Response.ContentType = "text/plain"
| However, when I telnet to my server on port 80 to see what actually gets
| output, I see these headers:
|
| HTTP/1.1 200 OK
| Server: Microsoft-IIS/5.0
| Date: Sun, 07 Mar 2004 17:04:39 GMT
| X-Powered-By: ASP.NET
| Connection: Keep-Alive
| Content-Length: 391
| Content-Type: text/plain
| Set-Cookie: [SNIPPED BY ME]; path=/
| Cache-control: private
|
| If I try the same with a text file, I just get the file with no headers
| (which is what I need)
| Is there a way to turn these headers off? Do I have to set some ASP variable | for that?
|
| -Oleg.
|
|
|

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: chuck amadi | last post by:
By the way list is there a better way than using the readlines() to > > >parse the mail data into a file , because Im using > > >email.message_from_file it returns > > >all the data i.e reads one...
1
by: nomadx | last post by:
hello, could someone please check this out? #usr/local/bin/perl # Filelist.pl version 0.1 use strict; use CGI qw(:all); use CGI::Pretty; #use CGI::Carp qw(fatalsToBrowser); use Cwd; my...
6
by: Tom Petersen | last post by:
Here is a little more info, sorry should have explained what my final goal was. I am creating a .vcs file from a form to import into Outlook. I was just testing the output on screen then pasting...
4
by: rossum | last post by:
I have been looking at exceptions as I need to get better at using them. I came across an interesting effect, demonstrated below. When I ctrl-Z the input to throw an ios_base::failure, the...
4
by: Nick | last post by:
Hi, I am trying to output a string of chinese characters as a text file. When I open a file for writing from VB, the file is automatically set to UTF-8 encoding (can tell by opening the file...
4
by: astromac | last post by:
I'm new to php and was wondering if the following was possible... I would like to have a list of items loaded from a text file, process each item in the list and then return the processed result...
32
by: spibou | last post by:
Is the output of the C preprocessor deterministic ? What I mean by that is , given 2 compilers which conform to the same standard, will their preprocessors produce identical output given as input...
6
by: cfish | last post by:
I'm trying to script my contact page and I have everything the way I want it however I cannot get my script to output Address, City, State, Zip & Phone Number when I get a email. It will output...
10
by: John | last post by:
Hello, I have an html menu that I renamed menu.php. I then have a download program which uses an index.php file. I did the standard <?php include("menu.php"); ?command and I see the menu....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.