Server.ScriptTimeout in IIS with ASP

J

Jo Becaus

Hi,

I created ASP page with following sourcecode.

<%@ language="VBSCRIPT" %>
<!--#include file="./configuration/code_nofile.asp"-->
<!-- Author: Jo Becaus
-->
<HTML>
<HEAD>
<TITLE>Infrastructure_Team</TITLE>
<LINK href="mrtg.css" rel=stylesheet type=text/css>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="Damovo Belgium" name="Jo Becaus"></HEAD>
<BODY marginwidth="1">
<DIV id=Clock align=right style="COLOR: #ffffff; FONT-FAMILY: Verdana;
FONT-SIZE: 11px"></DIV>
<SCRIPT language="javascript">
function mouse_over(td_name)
{

if(eval("this." + td_name)!= null)
{
if (td_name != name)
{
eval("this['" + td_name + "'].bgColor='#ff0000'")
}
}
}

function mouse_out(td_name)
{

if(eval("this." + td_name)!= null)
{
if (td_name != name)
{
eval("this['" + td_name + "'].bgColor='#cccccc'")
}
}
}
</SCRIPT>
<SPAN style="CURSOR: hand">
<TABLE bgColor=#cccccc border=0 cellPadding=2 cellSpacing=1 width=186>
<TBODY>
<TR bgcolor=#ffffff
onclick="window.open('home.asp','rContent')"
onmouseout="mouse_out('HomePage')"
onmouseover="mouse_over('HomePage')">
<TD bgColor=#cccccc id=HomePage height=14 width=14
bordercolor=#cccccc>&nbsp;</TD>
<TD bordercolor=#c0c0c0 height=14 width=195><FONT color=black
size=1>Damovo SNMP Home</TD></TR>
</TBODY>
</TABLE>
<BR>
<HR>
<BR>
</SPAN>
<!-- --><!-- Start Main Menu --><!-- -->
<SPAN style="CURSOR: hand">
<TABLE bgColor=#cccccc border=0 cellPadding=2 cellSpacing=1 height=14
width=180>
<TBODY>
<TR
onclick="window.open('configuration/config.asp','rContent')"
onmouseout="mouse_out('Configuration')"
onmouseover="mouse_over('Configuration')">
<TD bgColor=#cccccc height=14 id=Configuration
width=14>&nbsp;</TD>
<TD bgColor=#ffffff height=14 width=186><FONT
size=1>Configuration</FONT></TD></TR>
</TR>
<TR
onmouseout="Sites_sub.style.visibility =
'hidden';mouse_out('Sites')"
onmouseover="Sites_sub.style.visibility =
'visible';mouse_over('Sites')">
<TD bgColor=#cccccc height=14 id=Sites width=14>&nbsp;</TD>
<TD bgColor=#ffffff height=14 width=186><FONT size=1>Sites
Monitoring</FONT></TD></TR>
</TBODY>
</TABLE>
</SPAN>

<!-- SubMenu's-->
<SPAN style="CURSOR: hand">
<DIV id=Sites_sub
onmouseout ="Sites_sub.style.visibility = 'hidden';mouse_out('Sites')"
onmouseover ="Sites_sub.style.visibility =
'visible';mouse_over('Sites')"
style="background-color: #999999; height: 10; left: 60; position:
absolute; top: 100; visibility: hidden; width: 10; z-index: 4;
layer-background-color: #999999">
<TABLE bgcolor=#cccccc border=0 cellpadding=2 cellspacing=1
width=140 height=<%=ObjDict.Count*14%>>
<TBODY>
<%
Dim i
i = 1
Do
Response.Write "<TR onmouseout=""" & ObjDict.Item(i) &
"_Sub.style.visibility = 'hidden';mouse_out('" & ObjDict.Item(i) &
"')"""
Response.Write "onmouseover=""" & ObjDict.Item(i) &
"_Sub.style.visibility = 'visible';mouse_over('" & ObjDict.Item(i) &
"')>"""
Response.Write "<TD bgColor=#cccccc height=14 id=" &
ObjDict.Item(i) & " width=30>&nbsp;</TD>"
Response.Write "<TD bgColor=#ffffff height=14 width=200><FONT
size=1>" & ObjDict.Item(i) & "</FONT></TD></TR>"
i = i + 1
Loop Until i < ObjDict.Count
%>
</TBODY>
</TABLE>
</DIV>
</SPAN>


This is the code from the include file:

<%
Public objDict
Dim ObjFSO, objFolder
Const Folder = "C:\WWW\MRTG\Configuration\Devices\"
Set ObjDict = CreateObject("Scripting.Dictionary")
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
Call ShowSubFolders (objFSO.GetFolder(Folder))

Function ShowSubFolders(Folder)
Count = 0
For Each Subfolder in Folder.SubFolders
MyFoldArray = Split(Subfolder.path,"\",-1,1)
If ShowFiles(SubFolder,MyFoldArray(5)) Then
Count = Count + 1
objDict.Add Count, MyFoldArray(5)
End If
Next
Set objFSO = Nothing
Set FolderFile = Nothing
End Function

Function ShowFiles(FolderSpec,ParentFolder)
Dim Filec,FileCount,FileEx,Counter,FileName
Set Files = objFSO.GetFolder(FolderSpec)
Set FileCount = files.Files
For Each FileEx in FileCount
If lcase(FileEx.Type) = "cfg file" Then
Counter = Counter + 1
End If
Next
If Counter > 0 Then
ShowFiles = True
Else
ShowFiles = False
End If
End Function
%>

When putting a Response.write with the Dictionary values and open de
include file direct all is fine.

But when I run the menu.asp file which has the file included I get a
timeout?

Even when I extend the IIS timeout value to hours I never receive a
value nor data?
 
A

Aaron [SQL Server MVP]

http://www.aspfaq.com/2180

--
http://www.aspfaq.com/
(Reverse address to reply.)




Jo Becaus said:
Hi,

I created ASP page with following sourcecode.

<%@ language="VBSCRIPT" %>
<!--#include file="./configuration/code_nofile.asp"-->
<!-- Author: Jo Becaus
-->
<HTML>
<HEAD>
<TITLE>Infrastructure_Team</TITLE>
<LINK href="mrtg.css" rel=stylesheet type=text/css>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="Damovo Belgium" name="Jo Becaus"></HEAD>
<BODY marginwidth="1">
<DIV id=Clock align=right style="COLOR: #ffffff; FONT-FAMILY: Verdana;
FONT-SIZE: 11px"></DIV>
<SCRIPT language="javascript">
function mouse_over(td_name)
{

if(eval("this." + td_name)!= null)
{
if (td_name != name)
{
eval("this['" + td_name + "'].bgColor='#ff0000'")
}
}
}

function mouse_out(td_name)
{

if(eval("this." + td_name)!= null)
{
if (td_name != name)
{
eval("this['" + td_name + "'].bgColor='#cccccc'")
}
}
}
</SCRIPT>
<SPAN style="CURSOR: hand">
<TABLE bgColor=#cccccc border=0 cellPadding=2 cellSpacing=1 width=186>
<TBODY>
<TR bgcolor=#ffffff
onclick="window.open('home.asp','rContent')"
onmouseout="mouse_out('HomePage')"
onmouseover="mouse_over('HomePage')">
<TD bgColor=#cccccc id=HomePage height=14 width=14
bordercolor=#cccccc>&nbsp;</TD>
<TD bordercolor=#c0c0c0 height=14 width=195><FONT color=black
size=1>Damovo SNMP Home</TD></TR>
</TBODY>
</TABLE>
<BR>
<HR>
<BR>
</SPAN>
<!-- --><!-- Start Main Menu --><!-- -->
<SPAN style="CURSOR: hand">
<TABLE bgColor=#cccccc border=0 cellPadding=2 cellSpacing=1 height=14
width=180>
<TBODY>
<TR
onclick="window.open('configuration/config.asp','rContent')"
onmouseout="mouse_out('Configuration')"
onmouseover="mouse_over('Configuration')">
<TD bgColor=#cccccc height=14 id=Configuration
width=14>&nbsp;</TD>
<TD bgColor=#ffffff height=14 width=186><FONT
size=1>Configuration</FONT></TD></TR>
</TR>
<TR
onmouseout="Sites_sub.style.visibility =
'hidden';mouse_out('Sites')"
onmouseover="Sites_sub.style.visibility =
'visible';mouse_over('Sites')">
<TD bgColor=#cccccc height=14 id=Sites width=14>&nbsp;</TD>
<TD bgColor=#ffffff height=14 width=186><FONT size=1>Sites
Monitoring</FONT></TD></TR>
</TBODY>
</TABLE>
</SPAN>

<!-- SubMenu's-->
<SPAN style="CURSOR: hand">
<DIV id=Sites_sub
onmouseout ="Sites_sub.style.visibility = 'hidden';mouse_out('Sites')"
onmouseover ="Sites_sub.style.visibility =
'visible';mouse_over('Sites')"
style="background-color: #999999; height: 10; left: 60; position:
absolute; top: 100; visibility: hidden; width: 10; z-index: 4;
layer-background-color: #999999">
<TABLE bgcolor=#cccccc border=0 cellpadding=2 cellspacing=1
width=140 height=<%=ObjDict.Count*14%>>
<TBODY>
<%
Dim i
i = 1
Do
Response.Write "<TR onmouseout=""" & ObjDict.Item(i) &
"_Sub.style.visibility = 'hidden';mouse_out('" & ObjDict.Item(i) &
"')"""
Response.Write "onmouseover=""" & ObjDict.Item(i) &
"_Sub.style.visibility = 'visible';mouse_over('" & ObjDict.Item(i) &
"')>"""
Response.Write "<TD bgColor=#cccccc height=14 id=" &
ObjDict.Item(i) & " width=30>&nbsp;</TD>"
Response.Write "<TD bgColor=#ffffff height=14 width=200><FONT
size=1>" & ObjDict.Item(i) & "</FONT></TD></TR>"
i = i + 1
Loop Until i < ObjDict.Count
%>
</TBODY>
</TABLE>
</DIV>
</SPAN>


This is the code from the include file:

<%
Public objDict
Dim ObjFSO, objFolder
Const Folder = "C:\WWW\MRTG\Configuration\Devices\"
Set ObjDict = CreateObject("Scripting.Dictionary")
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
Call ShowSubFolders (objFSO.GetFolder(Folder))

Function ShowSubFolders(Folder)
Count = 0
For Each Subfolder in Folder.SubFolders
MyFoldArray = Split(Subfolder.path,"\",-1,1)
If ShowFiles(SubFolder,MyFoldArray(5)) Then
Count = Count + 1
objDict.Add Count, MyFoldArray(5)
End If
Next
Set objFSO = Nothing
Set FolderFile = Nothing
End Function

Function ShowFiles(FolderSpec,ParentFolder)
Dim Filec,FileCount,FileEx,Counter,FileName
Set Files = objFSO.GetFolder(FolderSpec)
Set FileCount = files.Files
For Each FileEx in FileCount
If lcase(FileEx.Type) = "cfg file" Then
Counter = Counter + 1
End If
Next
If Counter > 0 Then
ShowFiles = True
Else
ShowFiles = False
End If
End Function
%>

When putting a Response.write with the Dictionary values and open de
include file direct all is fine.

But when I run the menu.asp file which has the file included I get a
timeout?

Even when I extend the IIS timeout value to hours I never receive a
value nor data?
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top