For Programmers: Free Programming Magazines  


Home > Archive > ASP > January 2007 > Classic ASP and IIS 6.0









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Classic ASP and IIS 6.0
anon

2007-01-31, 6:56 pm

The following code works on IIS 5.0 on a Windows 2000 server.

Response.Clear Response.ContentType = "application/rtf" Response.AddHeader
"content-disposition", "inline;filename=letter.rtf" response.write l_strBuffer

But on IIS 6.0 running on Windows 2003 server we get an error.
"Internet Explorer cannot download <file name>.
Interner Explorer was not able to open this Internet site. The site is
either unavailable or cannot be found. Please try again later."

After increasing the AspBufferLimit attribute in the metabase.xml, we were
able to resolve the issue.
Is there any other way to resolve this without modifying the metabase.xml ?

Anthony Jones

2007-01-31, 6:56 pm


"anon" <anon@discussions.microsoft.com> wrote in message
news:47F19B94-2266-4742-B79F-41C665E35BBD@microsoft.com...
> The following code works on IIS 5.0 on a Windows 2000 server.
>
> Response.Clear Response.ContentType = "application/rtf" Response.AddHeader
> "content-disposition", "inline;filename=letter.rtf" response.write

l_strBuffer
>
> But on IIS 6.0 running on Windows 2003 server we get an error.
> "Internet Explorer cannot download <file name>.
> Interner Explorer was not able to open this Internet site. The site is
> either unavailable or cannot be found. Please try again later."
>
> After increasing the AspBufferLimit attribute in the metabase.xml, we were
> able to resolve the issue.
> Is there any other way to resolve this without modifying the metabase.xml

?
>



add

Response.Buffer = False
Response.ContentType = "application/rtf"
Response.CharSet = "Windows-1252" ' Set appropriate to codepage
Response.AddHeader "content-disposition", "inline;filename=letter.rtf"

Dim i
Const clChunkSize = 1048576
For i = 1 To Len(l_strBuffer) \ clChunkSize
Response.Write Mid(l_strBuffer, (i -1) * clChunkSize, clChunkSize)
Next

If (Len(lstrBuffer) Mod clChunkSize) <> 0 Then
Response.Write Mid(l_strBuffer, (i -1) * clChunkSize)
Next


The rtf content is dynamically generated?



anon

2007-01-31, 6:56 pm



"Anthony Jones" wrote:

>
> "anon" <anon@discussions.microsoft.com> wrote in message
> news:47F19B94-2266-4742-B79F-41C665E35BBD@microsoft.com...
> l_strBuffer
> ?
>
>
> add
>
> Response.Buffer = False
> Response.ContentType = "application/rtf"
> Response.CharSet = "Windows-1252" ' Set appropriate to codepage
> Response.AddHeader "content-disposition", "inline;filename=letter.rtf"
>
> Dim i
> Const clChunkSize = 1048576
> For i = 1 To Len(l_strBuffer) \ clChunkSize
> Response.Write Mid(l_strBuffer, (i -1) * clChunkSize, clChunkSize)
> Next
>
> If (Len(lstrBuffer) Mod clChunkSize) <> 0 Then
> Response.Write Mid(l_strBuffer, (i -1) * clChunkSize)
> Next
>
>
> The rtf content is dynamically generated?
>
>
>


Thanks you for the reply.
We have an rtf template. The bookmarks in the template are replaced and rtf
is spit out.
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com