Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Max File Size for File Streaming in IIS

Status
Not open for further replies.

TheVillageIdiot27

Programmer
Nov 10, 2005
58
GB
I have an ASP page with the following code snippet which sends a file "strDocumentPath" back to the user.

Code:
			Set objFile = objFSO.GetFile(strDocumentPath)
			Response.Clear
			Response.AddHeader "Content-Disposition", "attachment; filename=" & objFile.Name
			Response.AddHeader "Content-Length", objFile.Size
			Response.ContentType = strContentType
			Set objStream = Server.CreateObject("ADODB.Stream")
			objStream.Open
			objStream.Type = 1
			Response.CharSet = "UTF-8"
			objStream.LoadFromFile(strDocumentPath)
			Response.BinaryWrite(objStream.Read)
			objStream.Close
			Set objStream = Nothing
			Set objFile = Nothing

The above works quite happily, until a certain file size is reached then it crashes.

I have set this up before and I am sure you need to tweak something in the metabase.xml but I can't for the life of me remember or find on google what.

If anyone can help I would very much appreciate it.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top