Results 1 to 3 of 3

Thread: The website cannot display the page

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2007
    Posts
    38

    The website cannot display the page

    Hi all,

    I have some doubts regarding to show the PDF file into the browser.

    When I open a small PDF I have successfully loaded PDF file. But when go to the large size pdf means above 100mb It displays "The website cannot display the page".

    Could any one help me resolve this issue.

    Thanks in advance
    Code:
            Response.Buffer = true
    	Response.Clear()
    	Set objStream = Server.CreateObject("ADODB.Stream") 
    	objStream.Type = 1		
    	objStream.Open 
    	objStream.LoadFromFile(filepath)
    	Response.ContentType = "application/pdf"
    	Response.AddHeader "Content-Length", objStream.Size
    	Response.BinaryWrite objStream.Read

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: The website cannot display the page

    You have the filepath, why not just redirect the user to the PDF directly?

  3. #3
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: The website cannot display the page

    I know in ASP.Net, there is a maximum file size limit of 4Mb by default. This can be overcome by setting an entry within the web.config file, however I don't personally know the equivalent routine, or if one exists for classic ASP.

    I did manage to find you this however if you aren't going with/can't go with 's suggestion there. On this Microsoft KB 812406 article, it details writing chunks of the file to the response output stream as a workaround. Though the samples are written in .Net languages, the theory and explainations still hold true for your scenario.

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width