Please Help ?????????

Discussion in 'ASP General' started by pargat singh, Mar 1, 2004.

  1. pargat singh

    pargat singh Guest

    Hi Everyone,

    THIS IS SECOND TIME I AM POSTING MY PROBLEM.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
    pargat singh, Mar 1, 2004
    #1
    1. Advertising

  2. pargat singh

    Chris Barber Guest

    Sound like you have an issue with the logic that is selecting File and
    returning the binary - have you checked that it's finding the correct file?

    NB: Don't post in uppercase - it's hard to read and tantamount to shouting.

    Chris.

    "pargat singh" <> wrote in message
    news:...
    Hi Everyone,

    THIS IS SECOND TIME I AM POSTING MY PROBLEM.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
    Chris Barber, Mar 1, 2004
    #2
    1. Advertising

  3. pargat singh

    Evertjan. Guest

    pargat singh wrote on 01 mrt 2004 in
    microsoft.public.inetserver.asp.general:

    > Hi Everyone,
    >
    > THIS IS SECOND TIME I AM POSTING MY PROBLEM.


    Do not shout !!!

    > 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);


    sPath undefined

    > Response.AddHeader("pragma","no-cache")
    > Response.AddHeader ("cache-control","private")
    >
    > Response.CacheControl = "no-cache" ------> I think this line is
    > main.


    "I think this line is main." I do not understand that.


    >
    > Response.ContentType = contentType


    contentType undefined


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


    file undeclared. Wahat is "return from COM" ?


    > 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).


    I see no buttons at all in your code.

    > 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


    Now you are shouting again. Something wrong with your caps-lock key ?

    > INTERNET EXPLORER CANNOT DOWNLOAD FILE 123.LOG. ...............


    I feel very case sensitive about this.


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Mar 1, 2004
    #3
  4. Maybe he's trying to return all the files at once (in a loop)? Hard to say
    without seeing the code.

    Evertjan. wrote:
    > pargat singh wrote on 01 mrt 2004 in
    > microsoft.public.inetserver.asp.general:
    >
    >> Hi Everyone,
    >>
    >> THIS IS SECOND TIME I AM POSTING MY PROBLEM.

    >
    > Do not shout !!!
    >
    >> 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);

    >
    > sPath undefined
    >
    >> Response.AddHeader("pragma","no-cache")
    >> Response.AddHeader ("cache-control","private")
    >>
    >> Response.CacheControl = "no-cache" ------> I think this line is
    >> main.

    >
    > "I think this line is main." I do not understand that.
    >
    >
    >>
    >> Response.ContentType = contentType

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

    >
    > file undeclared. Wahat is "return from COM" ?
    >
    >
    >> 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).

    >
    > I see no buttons at all in your code.
    >
    >> 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

    >
    > Now you are shouting again. Something wrong with your caps-lock key ?
    >
    >> INTERNET EXPLORER CANNOT DOWNLOAD FILE 123.LOG. ...............

    >
    > I feel very case sensitive about this.
    Michel Thiffault, Mar 1, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JC
    Replies:
    4
    Views:
    7,947
    Jeff C
    Jul 8, 2004
  2. Replies:
    4
    Views:
    491
    Chris Uppal
    May 5, 2005
  3. KK
    Replies:
    2
    Views:
    518
    Big Brian
    Oct 14, 2003
  4. MuZZy
    Replies:
    7
    Views:
    1,717
    Mike Hewson
    Jan 7, 2005
  5. mera
    Replies:
    7
    Views:
    1,078
Loading...

Share This Page