Change the AspBufferingLimit setting in Metabase.xml to a larger size (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


mendi200 -> Change the AspBufferingLimit setting in Metabase.xml to a larger size (2/10/2008 1:00:34)

I have an ASP script (WS Download) that prompts a user to "save as" when they (left) click a file/hyperlink. When I call for it to download more than 4 mb it won't save it.
After a bit of research I’ve found I need to change the AspBufferingLimit setting in Metabase.xml to a larger size.

I am a newbie and have no idea how to go about this. If someone could tell me how to do this like I have half a brain, that would be wonderful!

(Addition instructions I do not understand: make the Metabase.xml file write-able, you need to go to the IIS control panel, right click the server, select properties, and check off the box that says “allow changes to MetaBase configuration while IIS is running".)

Thanks so much!


This is the code I’m using:

<%@Language="VBScript"%>
<%Option Explicit%>
<%Response.Buffer = True%>


<%
On Error Resume Next
Dim strPath
strPath = CStr(Request.QueryString("FileName"))
'-- do some basic error checking for the QueryString
If strPath = "" Then
Response.Clear
Response.Write("Pas de fichier spécifié.")
Response.End
ElseIf Len(strPath) > 1024 Then
Response.Clear
Response.Write("Chemin trop long.")
Response.End
Else
Call DownloadFile(strPath)
End If

Private Sub DownloadFile(fichier)
'--declare variables
Dim strAbsFile
Dim strFileExtension
Dim objFSO
Dim objFile
Dim objStream
'-- set absolute file location
strAbsFile = Server.MapPath(fichier)
'-- create FSO object to check if file exists and get properties
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'-- check to see if the file exists
If objFSO.FileExists(strAbsFile) Then
Set objFile = objFSO.GetFile(strAbsFile)
'-- first clear the response, and then set the appropriate headers
Response.Clear
'-- the filename you give it will be the one that is shown
' to the users by default when they save
Response.AddHeader "Content-Disposition", "attachment; filename=" & objFile.Name
Response.AddHeader "Content-Length", objFile.Size
Response.ContentType = "application/octet-stream"

Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
'-- set as binary
objStream.Type = 1
Response.CharSet = "UTF-8"
'-- load into the stream the file
objStream.LoadFromFile(strAbsFile)
'-- send the stream in the response
Response.BinaryWrite(objStream.Read)
objStream.Close
Set objStream = Nothing
Set objFile = Nothing
Else 'objFSO.FileExists(strAbsFile)
Response.Clear
Response.Write("Le fichier est inexistant.")
End If
Set objFSO = Nothing
End Sub
%>





Spooky -> RE: Change the AspBufferingLimit setting in Metabase.xml to a larger size (2/10/2008 16:53:38)

It sounds like you have all the info already?




mendi200 -> RE: Change the AspBufferingLimit setting in Metabase.xml to a larger size (2/10/2008 17:14:58)

I do, but I don't.. I'm actually a step further and behind at the same time because I found out that my web company needs to access these files.. The bad news is that I use 1and1, and they're either lazy or complete retards because anytime I've ever called them for c.s. they've been about as helpful as a bad case of the chicken pox..

Thanks for responding.




Spooky -> RE: Change the AspBufferingLimit setting in Metabase.xml to a larger size (2/10/2008 18:13:46)

Ahh yes, if you dont have immediate access to the server, you are at their mercy... [:o]




mendi200 -> RE: Change the AspBufferingLimit setting in Metabase.xml to a larger size (2/10/2008 18:35:40)

Yeah like I said I'm completely screwed. Every time I call there I speak with a dude who can barely speak English and he says his name is "Tim" or "Bob". Then he says they'll call me back and I never hear from them again..




Spooky -> RE: Change the AspBufferingLimit setting in Metabase.xml to a larger size (2/10/2008 18:38:26)

Do they have any other server based uploaders available?
If they do, a component based uploader will be more reliable than asp anyway




mendi200 -> RE: Change the AspBufferingLimit setting in Metabase.xml to a larger size (2/10/2008 19:05:31)

Not to my knowledge, I know PHP seems to be a good alternative, but I have a Windows package with them so that's out..




Spooky -> RE: Change the AspBufferingLimit setting in Metabase.xml to a larger size (2/11/2008 0:47:48)

They dont support php as well? quite a few windows hosts do




mendi200 -> RE: Change the AspBufferingLimit setting in Metabase.xml to a larger size (2/11/2008 11:16:22)

Nah, I'd have to get a separate hosting package..




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
6.445313E-02