Menu

Access Denied

Help
2011-10-28
2013-04-23
  • Omar Espallargas

    I know this might sound dumb. But when I create a file while on development mode, Everything works fine. However when publish my site to a server(localmachine same where I'm developing the program) I get the following error.

    Now, I'm using the tutorial to do this and the only information to open the PDF is this.

                const string filename = "Receipt.pdf";
                document.Save(filename);

                // …and start a viewer.
                Process.Start(filename);

    What folder do i need to give access to?(This is not good since I want many people to use the website) Can I open the file from memory? I have seen some code using File Stream but do not know how to implement it here.

    Any help replacing the code above?

    Thanks in advance.

     
  • PDFsharp Team

    PDFsharp Team - 2011-11-02

    Please visit the PDFsharp discussion forum at http://forum.pdfsharp.net/

    Code that saves to a stream:
    http://forum.pdfsharp.net/viewtopic.php?p=4596#p4596

    "What folder do i need to give access to?" =>
    "Access to the path 'c:\windows\system32\inetsrv\Receipt.pdf' is denied" => The folder is "c:\windows\system32\inetsrv\"

    Use a stream or specify a path for the PDF file (such as C:\TEMP). Make sure the application pool used for the web application can read that folder. Or better use a stream.

     

Log in to post a comment.