Permission to access PDF files from ASP.NET

Discussion in 'ASP .Net' started by ryu, Apr 1, 2005.

  1. ryu

    ryu Guest

    Hi All,

    My web app requires to access a PDF document. However it will not open when
    I start to access it using Process.Start("fileName"). Although at the task
    manager, it says that the Acrobat service has been started by ASPNET. Is
    there something I did wrong or have not done? Pls help.

    Thanks
     
    ryu, Apr 1, 2005
    #1
    1. Advertising

  2. ryu

    Hans Kesting Guest

    ryu wrote:
    > Hi All,
    >
    > My web app requires to access a PDF document. However it will not open when
    > I start to access it using Process.Start("fileName"). Although at the task
    > manager, it says that the Acrobat service has been started by ASPNET. Is
    > there something I did wrong or have not done? Pls help.
    >
    > Thanks
    >
    >


    You want to open a PDF on the *server*??

    Process.Start will open only local (that is: local *to the server*)
    processes and will open them on the *invisible* desktop of the ASPNET user.

    If you want to open that PDF file on the *client*, you need to send
    that file to the client:
    Response.AppendHeader("Content-Disposition", "attachment;
    filename=myfile.pdf");
    Response.ContentType = "application/pdf";
    Response.WriteFile("myLocalFile.pdf");
    Response.End();

    --
    Hans Kesting
     
    Hans Kesting, Apr 1, 2005
    #2
    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. Brent Bigler
    Replies:
    4
    Views:
    2,213
    Morgan
    Dec 20, 2003
  2. crazyprakash
    Replies:
    4
    Views:
    3,407
    adrian
    Oct 30, 2005
  3. James Wong

    ASP.NET access permission

    James Wong, Jul 14, 2008, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    106
    James Wong
    Jul 14, 2008
  4. Ricardo Pog
    Replies:
    1
    Views:
    455
    Austin Ziegler
    Mar 26, 2008
  5. Sean Nakasone
    Replies:
    1
    Views:
    400
    Farrel Lifson
    Apr 14, 2008
Loading...

Share This Page