Classic ASP and IIS 6.0

A

anon

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 ?
 
A

Anthony Jones

anon said:
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?
 
A

anon

Anthony Jones said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top