473,387 Members | 1,476 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,387 software developers and data experts.

Problem regarding view text file in browser.

Hi Everyone,

I have a log file like 123.log and i want to display this log in
browser.In ASP page at top i have following.

<%Response.Buffer = true;%>
<%Response.Expires = -1%>

Inside page i have

contentType = "text/plain";

Response.AddHeader("Content-Disposition","filename=" & sPath);
Response.AddHeader("pragma","no-cache")
Response.AddHeader ("cache-control","private")

Response.CacheControl = "no-cache" ------> I think this line is
main.

Response.ContentType = contentType
Response.Clear()
Response.BinaryWrite(File); --> File is return from COM in Binary
mode.
Response.Flush

I can have one log per job or multiple logs per job.
E.g 123.log
or
123.log
123.esplog
123.soplog etc

When i click Button View Logs i check if one log open it using code
above or if
multiple log then response.redirect to other page where it list all
logs like

123.log
123.esplog
123.soplog etc
and user click on log and behavior is same as single log(means same
code above).
PROBLEMS WHICH I AM FACING ARE BELOW.

1.WHEN SINGLE LOG LIKE 123.LOG OPEN FINE (NO PROBLEM) BUT IF MULTIPLA
LOG AND CLIECK ON 123.LOG I AM GETTING ERROR SAYING

INTERNET EXPLORER CANNOT DOWNLOAD FILE 123.LOG.
INTERNET EXPLORER WAS NOT ABLE TO OPEN THIS INTERNET SITE.THE
REQUESTED SITE
IS EITHER UNAVAILABLE ORCANNOT BE FOUND.PLEASE TRY AGAIN.

BUT IF I RENAME OTHE FILE LIKE 123_BKP1.ESPLOG AND 123_BKP2.SOPLOG
(BECAUSE BASED ON NAME PROGRAM DETECT IF MULTIPLE LOG OR SINGLE LOG)
IT WILL BE SINGLE LOG CASE AND I OPEN IT .WHY?

2. I CAN OPEN 123.ESPLOG BUT NOT 123.SOPLOG.BOTH FILES ARE SAME ONLY
WITH DIFFERENT EXTENSION.WHY?

CAN NAYONE PLEASE.....TELL ME HOW CAN I FIX THIS .THIS IS VERY URGENT
ISSUE FOR ME.ANY HELP IS MUCH MUCH APPRICATE.

THANKS,

GILL
Jul 19 '05 #1
0 1194

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

Similar topics

18
by: Lorem Ipsum | last post by:
interesting! I just found a page in which Explorer's View Source does nothing! How did they do that?
20
by: Neil | last post by:
I have an Access 2000 MDB file with a SQL 7 back end. I have a main table with 50,000 records; and I have a selections table with 50,000 records for each machine that uses the database (about...
1
by: Jerry Tovar | last post by:
I am using .Net 2003 on a XPPro running IIS. I am unable to view any of my ASPX webforms in a browser unless I modify the .ASPX file and replace Codebehind="employee.aspx.cs" with...
0
by: Lucas, Todd | last post by:
Hello everyone! I'm having a problem with a WebControl that I'm designing for a Menu. I've been at it for about 3 weeks now, and can't seem to get around this problem. So I'm hoping that someone...
3
by: Arun | last post by:
Hi, I have simple question to ask. How to write multiple Binary files to the Browser using Asp.Net and Visual C#.net I have seen examples where single binary file is written to browser. ...
4
by: PSL | last post by:
Hi, I am going through the training C# For Programmers made by TestOut and like the presentation. The only problem is that this tutorial has a nastie bug that renders this software practically...
4
by: xah | last post by:
In the latest version of Firefox and Opera, there's this problem: if a link points to a .txt file, the text file will open in browser with lines running off the window. Safari don't have this...
11
by: Flexor | last post by:
I have a php script that runs from command line and makes an https request to paypal, using curl. It works fine if I run it from a web page. It fails if I run it from CLI. The error I get from...
3
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I cut and paste the following code from msdn help page which it just introduces view and multiview server controls. Here is what I do: in vs studio 2005, File --New Web Site, it...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
Oralloy
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,...
0
jinu1996
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 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.