session and upload

karuta

Guppy
As it resolve the problem of expire the session, when I am doing an upload with the component ASPUPLOAD?

The function <% Server.ScriptTimeout = 90000 %> is not resolving!

Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> 
<% Server.ScriptTimeout = 90000 %>
<!--#include file="../Connections/conn.asp" -->
<!--#include file="verificalog.asp" -->
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
rsTipoDoc_numRows = rsTipoDoc_numRows + Repeat1__numRows
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
.text {FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Arial }
-->
</style>
<link href="stylesrb.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

//-->
</script>

</head>
<body>
<div align="center">
  <%
	Set Upload = Server.CreateObject("Persits.Upload")

	Upload.OverwriteFiles = False
	On Error Resume Next

	Upload.SetMaxSize 1048576	' Limit files to 1MB
	Count = Upload.SaveVirtual ("/anexos")
	
	'pega as vari?veis do form anterior
	nome = Upload.Form("nome")
	data = Upload.Form("data")
	tipodoc_id = Upload.Form("tipodoc_id")
    tipodoc2_id = Upload.Form("tipodoc2_id")
    keywords = Upload.Form("keywords")
    publico_privado = Upload.Form("publico_privado")
	cliente_id = Upload.Form("cliente_id")

	Set File = Upload.Files(1)
	arquivo = File.FileName
%>
  <% If Err <> 0 Then %>
</div>
<H3 align="left"><font color="#FF0000" size="2" face="Arial">Foi encontrado um erro no UPLOAD:</font> <font color="#FF0000" size="2" face="Arial">"
      <% = Err.Description %>
"</font></h3>
<div align="left"><FONT SIZE=2 FACE="Arial" COLOR="#0020A0"> <font color="#000000"><strong>Por Favor </strong><A HREF="p_main.asp">tente novamente</A>. </font></FONT> <font color="#000000" size="2">
  <% Else %>
</font> </div>
<h2 align="left">&nbsp;</h2>
<div align="center"><span class="titulo2">Arquivo enviado com Sucesso !
        <% = Count %>
    arquivo foi enviado para o sistema !
  <% end if %>
  </span><br>
</div>
<FORM ACTION="p_anexo_insere.asp" METHOD="POST" name="form" id="form">
  <table width="700" border="0" align="center" cellpadding="0" cellspacing="0" style="border-right: 1px solid #7F7F7F; border-left: 1px solid #7F7F7F; border-bottom: 1px solid #7F7F7F; border-top: 1px solid #7F7F7F; border-spacing: 1px">
    <tr>
      <td><table border="0" cellspacing="0" cellpadding="4" width="700">
          <tr>
            <td bgcolor="#E3E1B1" class="titulo1" >NOVO <% if publico_privado <> "2" then%> ANEXO <%else%> DOCUMENTO P&Uacute;BLICO <%end if%> </td>
          </tr>
          <tr>
            <td bgcolor="#ffffff" ><table align="center" cellpadding="4" cellspacing="2">
              <tr valign="baseline">
                <td align="right" nowrap class="verdana10"><strong>Nome:</strong></td>
                <td class="botao1"><input name="nome" type="text" id="nome" value="<%=nome%>" size="70" maxlength="200" readonly="true"> 
                </td>
              </tr>
              <tr valign="baseline">
                <td align="right" nowrap class="verdana10"><strong>Data:</strong></td>
                <td class="botao1"><input name="data" type="text" value="<%=data%>" size="15" maxlength="10" readonly="true"></td>
                </tr>
              <tr valign="baseline">
                <td align="right" nowrap class="verdana10"><strong>Tipo: </strong></td>
                <td class="botao1"><input name="tipodoc_id" type="text" id="tipodoc_id" value="<%=tipodoc_id%>" size="25" maxlength="8" readonly="true">


 </tr>
              <tr valign="baseline">
                <td align="right" nowrap class="verdana10"><strong>Ato:</strong></td>
                <td class="botao1"><input name="tipodoc2_id" type="text" id="tipodoc2_id" value="<%=tipodoc2_id%>" size="25" maxlength="8" readonly="true"></td>
              </tr>
              <tr valign="baseline">
                <td align="right" nowrap class="verdana10"><strong>Arquivo:</strong></td>
                <td class="botao1"><input name="arquivo"type="text" id="arquivo" value="<%=arquivo%>" size=70 readonly="true"></td>
              </tr>
              <tr valign="baseline">
			  <% if publico_privado <> "2" then%> 
                <td align="right" nowrap class="verdana10"><strong>Palavras-Chave:</strong></td>
                <td class="botao1"><input name="keywords" type="text" id="keywords" value="<%=keywords%>" size="100" maxlength="8000" >
                  <br>
                  <span class="verdana10">* Voc&ecirc; pode inserir outras palavras-chaves, separadas com espa&ccedil;os, antes de inserir o anexo </span>                  </td> <% end if %>
              </tr>
              <tr valign="baseline">
                <td align="right" nowrap class="verdana10">&nbsp;</td>
                <td class="botao1"><input name="Submit" type="submit" class="botao1" id="Submit" value="INSERIR">
                   <input name="Button" type="button" class="botao1" onClick="history.back()" value="VOLTAR">
				  </td>
              </tr>
            </table>              
            <p class="style3">
              <input name="publico_privado" type="hidden" id="publico_privado" value="<%=publico_privado%>">
              <input name="cliente_id" type="hidden" id="cliente_id" value="<%=cliente_id%>">
            </p></td>
          </tr>
          <tr>
            <td nowrap bgcolor="#ffffff" ><div align="right" class="verdana10"></div></td>
          </tr>
      </table></td>
    </tr>
  </table>
  <p>&nbsp;</p>
</form>
<p>&nbsp;</p>
</body>
</html>
 
HI,

a ticket for this issue already created , we are working on it and will update you ticket.

Regards
 
A session timeout of 90000 would be like 25 hours I believe, which would bring a server to its knees with memory usage, and there is no reason for such a long session at all.

each session uses memory on the server, sessions should never be longer than 20 minutes really, and if their is need for longer sessions they should be done via a database.
 
Back
Top