Response Buffer Limit Exceeded HJÆLP!
HejsaJeg har et seriøst problem med min kode, hvor jeg får følgende fejl:
##############################################
Response object error 'ASP 0251 : 80004005'
Response Buffer Limit Exceeded
/frame/shop/prodsheet.asp, line 0
Execution of the ASP page caused the Response Buffer to exceed its configured limit.
##############################################
Jeg har prøvet at sætte AspBufferLimit i Metabase.xml til næsten 500 MB (ved godt at det er sindsygt, men skulle prøve!!) og det hjalp ikke en bønne. Det er sket efter at jeg har tilføjet en visnings begrænsning på 10 produkter per sideat problemet er opstået, og nu har jeg siddet 4 timer og prøvet at få det til at virke
Koden er :
*********************************************
<% Response.Buffer = true %>
<html>
<head>
<title></title>
<%
Session("HasSearched") = True
dim cnn
Dim search_connection
Dim prod
Dim currentpage
Dim strSql
Dim nextPages
Dim Random_Number_Min
Dim Random_Number_Max
Dim Random_Number
Dim MINPIXELS1
Dim MINPIXELS2
MINPIXELS1 = 100
MINPIXELS2 = 100
%>
<script language="JavaScript" src="../slidemenu.js" type="text/javascript">
/**********************************************************************************
SlideMenu 2.0
* Copyright (C) 2002 Thomas Brattli
* This script was released at DHTMLCentral.com
* Visit for more great scripts!
* This may be used and changed freely as long as this msg is intact!
* We will also appreciate any links you could give us.
*
* Made by Thomas Brattli
*
*Script date: 08/05/2002 (keep this date to check versions)
*********************************************************************************/
</script>
<script type="text/javascript">
<!--
function showHideTable(theTable,theImg)
{
if (document.getElementById(theTable).style.display == 'none')
{
document.getElementById(theTable).style.display = 'block';
document.getElementById(theImg).src='../img/hidedesc.gif';
}
else
{
document.getElementById(theTable).style.display = 'none';
document.getElementById(theImg).src='../img/showdesc.gif';
}
}
//-->
</script>
<link rel="STYLESHEET" type="text/css" href="../holmbergcss.css">
</head>
<body marginleft="0" bgcolor="white" marginheight="0">
<form name="tcol" onsubmit="return false">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="590" valign="top">
<p id="top"></p>
<p align="right">
<font size="5" face="Verdana"><b><i>Produkter... </i></b></font><br>
<font size="3" face="Verdana"><b><i>Porta Brace - Video Tasker </i></b></font><br>
</p>
<center>
<table width="510" cellspacing="2" cellpadding="2" border="0">
<tr>
<td align="left" valign="top"><font size="1"><b>3 emner fundet.</b><br>Her vises fra
<b>1</b> til <b>3</b></font></td>
<td align="right" valign="middle">
<font size="1">
<b>Side :</b><a href="java script:void(0)"><font color="#333366">1</font></a>
</font>
</td>
</tr>
</table>
<br>
<%
If isEmpty(request.querystring("page")) Then
currentpage = 1
'####### Products ############
'## Create db objects and SQL
set ProductConn = Server.CreateObject("ADODB.Connection")
ProductConn.CursorLocation = 3
ProductConn.Open Application("ConnectString")
Set prodrs = Server.CreateObject("ADODB.Recordset")
ProductSql = "SELECT * FROM product"
Session("ThisSearch") = ProductSql
Else
currentpage = request.queryString("page")
ProductSql = Session("ThisSearch")
End If
'## Execute the query, store it into the result set
prodrs.CursorType = 3
prodrs.ActiveConnection = ProductConn
prodrs.Open ProductSql
Set prodrs = ProductConn.Execute(ProductSql)
While (not prodrs.EOF)
prodrs.PageSize = 10
prodrs.AbsolutePage = currentpage
%>
<table width="510" cellspacing="2" cellpadding="2" border="0">
<tr>
<td width="255" align="left" valign="top"><font size="1"><b><%=prodrs.recordcount%></b> first <br>second
<b>
<%
if prodrs.AbsolutePage=1 then
response.write("1")
else
response.write((prodrs.AbsolutePage*prodrs.PageSize)-(prodrs.pagesize-1))
end if
%>
</b> third
<b>
<%
if prodrs.recordCount<prodrs.PageSize then
response.write(prodrs.recordCount)
else
if prodrs.recordCount<(prodrs.PageSize*prodrs.AbsolutePage) then
response.write(prodrs.recordCount)
else
response.write((prodrs.AbsolutePage)*prodrs.PageSize)
end if
end if
%>
</b></b></font></td>
<td width="255" align="right" valign="middle">
<font size="2">
<%
if prodrs.pageCount>1 then
nextPages = "<b>fourth:</b> "
i = 1
while prodrs.pageCount>=i
nextPages = nextPages + "<a href=""prodsheet.asp?page="+ CStr(i)+" "">"
if i=prodrs.AbsolutePage then
nextPages = nextPages + "<font color=""#42BA63"">"+ CStr(i)+"</font>"
else
nextPages = nextPages + CStr(i)
end if
nextPages = nextPages + "</a> "
i = i + 1
wend
if prodrs.AbsolutePage<>prodrs.PageCount then
nextPages = nextPages + "<a href=""prodsheet.asp?page="+ CStr((prodrs.AbsolutePage+1)) +""">"
nextPages = nextPages + "<img src=""../img/arrowright.gif"" width=""14"" height=""14"" border=""0""></a>"
end if
end if
response.write(nextPages)
%>
</font>
</td>
</tr>
</table>
<table width="510" cellspacing="1" cellpadding="4" border="1" bordercolor="#333366">
<tr>
<td colspan="3" width="510" align="left" bgcolor="#333366"><font size="2" color="FFFFFF"><b><%=prodrs("prodheadline")%> - Vare Nr. <%=prodrs("varenr")%></b></font></td>
</tr>
<tr>
<td style="width: 135px;" align="center" valign="middle"><% if not prodrs("image") = "" then %>
<A HREF="#" onclick="window.open('../../admin/frame/shop/prodimg/<%=prodrs("image")%>','largeimage', 'width=450, height=350,top=100,left=30')">
<%
Dim ImageName, DummyPic
'Create a Random Number called Random_Number
Randomize
'Set your Min and Max Values
Random_Number_Min = 2
Random_Number_Max = 9999
'Call the RND Command
Random_Number = Int(((Random_Number_Max-Random_Number_Min+1) * Rnd) + Random_Number_Min)
DummyPic = "../../img/nopic.jpg"
ImageName = "/admin/frame/shop/prodimg/" & prodrs("image")
if Len(ImageName) < 1 then
ImageName = DummyPic
end if
ImageName = Server.MapPath(ImageName)
'response.write(ImageName)
'*** get width/height of original image
Set objImageSize = Server.CreateObject("ImgSize.Check")
objImageSize.FileName = ImageName
ImageHeight = objImageSize.Height
ImageWidth = objImageSize.Width
If ImageHeight < 1 then ImageHeight = 1 end if
If ImageWidth < 1 then ImageWidth = 1 end if
'*** calculate aspect ratio based on MINPIXELS
If ImageHeight > ImageWidth Then
NewHeight = (ImageHeight*(MINPIXELS2/ImageWidth)) '###CInt
NewWidth = MINPIXELS2
Else
NewWidth = (ImageWidth*(MINPIXELS2/ImageHeight)) '###CInt
NewHeight = MINPIXELS2
End If
Set objImageSize = Nothing
'*** create thumbnail image
Set Image = Server.CreateObject("AspImage.Image")
Image.LoadImage(ImageName)
newPicFileNameOnDisk = ""
NewPicLogicalFileName = ""
NewPicLogicalFileName = "/admin/frame/shop/prodimg/small/small_" & Random_Number & ".jpg"
newPicFileNameOnDisk = Server.MapPath(NewPicLogicalFileName)
newPicFileNameOnDisk = trim(newPicFileNameOnDisk)
response.write(newPicFileName)
Image.FileName = newPicFileNameOnDisk
Image.ImageFormat = 1
Image.JPEGQuality = 100
Image.Resize NewWidth,NewHeight
Image.SaveImage
Set Image = Nothing
Response.Write "<img src=""" & newPicLogicalFileName & """ border=""0"">"
'wend
%>
</a>
<% else %>
<img src="../../admin/frame/shop/prodimg/nopic.jpg" width="80" height="80" alt="">
<% end if %></td>
<td style="width: 230px" valign="top">
<table cellspacing="2" cellpadding="2" border="0" style="width: 230px">
<tr>
<td style="width: 87px" valign="top" nowrap><font size="1" color="#333366"><b>Materiale</b></font></td>
<td style="width: 5px" valign="top" nowrap><font size="1" color="#333366"><b>:</b></font></td>
<td style="width: 138px" valign="top"><font size="1" color="#333366"><%=prodrs("material")%></font></td>
</tr>
<tr>
<td style="width: 87px" valign="top" nowrap><font size="1" color="#333366"><b>Bruges til</b></font></td>
<td style="width: 5px" valign="top" nowrap><font size="1" color="#333366"><b>:</b></font></td>
<td style="width: 138px" valign="top"><font size="1" color="#333366"><%=prodrs("usedfor")%></font></td>
</tr>
<tr>
<td style="width: 87px" valign="top" nowrap><font size="1" color="#333366"><b>Andet</b></font></td>
<td style="width: 5px" valign="top" nowrap><font size="1" color="#333366"><b>:</b></font></td>
<td style="width: 138px" valign="top"><font size="1" color="#333366"><%=prodrs("other")%></font></td>
</tr>
<tr>
<td style="width: 87px" valign="top" nowrap><font size="1" color="#333366"><b>Leverings tid</b></font></td>
<td style="width: 5px" valign="top" nowrap><font size="1" color="#333366"><b>:</b></font></td>
<td style="width: 138px" valign="top"><font size="1" color="#333366"><%=prodrs("delieverylessthen")%> <%=prodrs("delieveryamount")%> <%=prodrs("delieverydays")%></font></font></td>
</tr>
<tr>
<td style="width: 87px" valign="top" nowrap><font size="1" color="#333366"><b>Vejl. Pris</b></font></td>
<td style="width: 5px" valign="top" nowrap><font size="1" color="#333366"><b>:</b></font></td>
<td style="width: 138px" valign="top"><font size="1" color="#333366">DKr. <%=prodrs("price")%>.00</font></td>
</tr>
<tr>
<td style="width: 87px" valign="top" nowrap><font size="1" color="#CC0033"><b>DR´s Pris</b></font></td>
<td style="width: 5px" valign="top" nowrap><font size="1" color="#CC0033"><b>:</b></font></td>
<td style="width: 138px" valign="top"><font size="1" color="#CC0033">DKr. 2000.00</font></td>
</tr>
<tr>
<td style="width: 87px" valign="top" nowrap><font size="1" color="#333366"><b>Hjemmeside</b></font></td>
<td style="width: 5px" valign="top" nowrap><font size="1" color="#333366"><b>:</b></font></td>
<td style="width: 138px" valign="top"><font size="1" color="#333366"><a href="http://<%=prodrs("homepage")%>" target="_blank">Klik her</a></font></td>
</tr>
</table>
</td>
<td width="80" valign="top" bordercolor="#333366" bgcolor="#BCC0D9"><font size="1" color="#333366"><b><u>Antal :</u></b></font><br>
<table cellspacing="2" cellpadding="0" border="0">
<tr>
<td><input type="text" name="name" style="width: 50px; font-size: 9px; color: #333366; border-color: #333366;" maxlength="4"></td>
<td><a href="java script:void(0)" target="_self"><img src="../img/kurv.gif" border="0" bordercolor="000000"></a></td>
</tr>
</table>
<br>
<font size="1" color="#FFFFFF"><b><u>Dkr. Ialt :</u></b></font><br>
<center><font size="2" color="#FFFFFF"><b>600.000,00</b></font></center>
</td>
</tr>
<tr>
<td colspan="3" style="width: 400px; height: 10px" valign="top" bgcolor="#333366"><a href="#" onClick="showHideTable('tbl<%= prodrs("id")%>','e<%= prodrs("id")%>');return false;"><img id="e<%= prodrs("id")%>" src="../img/showdesc.gif" border="0" alt=""></a></td>
</tr>
<tr id="tbl<%= prodrs("id")%>" style="display: none;">
<td colspan="3" width="400" valign="top"><font size="1" color="#333366"><%=prodrs("description")%></font></td>
</tr>
</table>
<br>
<%
prodrs.movenext
wend
%>
<br>
<table width="510" cellspacing="2" cellpadding="2" border="0">
<tr>
<td align="left" valign="top"><font size="1"><b>3 emner fundet.</b><br>Her vises fra
<b>1</b> til <b>3</b></font></td>
<td align="right" valign="middle">
<font size="1">
<b>Side :</b><a href="soeg.asp?noOfHitsPerPage=10&soeg=laos&page=1"><font color="#333366">1</font></a>
</font>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</table>
<br>
<br>
</body>
</html>
*********************************************
Undskyld den lange kode, men jeg tror det er næmmere at se det hele !
Er der nogen der kan hjælpe mig med dette store problem??
Mvh
Stig :-)
