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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP code no-longer works, heavy filesystem code

Status
Not open for further replies.
Jun 15, 2003
8
US
This code worked perfectly about two months ago. Now when I try to run it it just hangs like its in a loop. The only diffrence from then and now is applying service pack 4 and some hotfixes from ms. I didnt write this and the guy whom did nolonger works with us and I dont know enough of ASP to really debug this.

Thanks so much guys and gals for any help

system: windows2k pro
SERVER: IIS5

======================= code =====================
Code:
<%@LANGUAGE=&quot;VBSCRIPT&quot; CODEPAGE=&quot;CP_ACP&quot;%>
<%   
 
' On Error Resume Next 
Response.Buffer = True

' dimension our variables first   
Dim files_collection, filecount, filecounttable

' get variables for the current page and submitted directory     
  
strDIR = Server.MapPath(&quot;.&quot;)   
set files_collection = folder.Files   
filecount = files_collection.Count 
 
' create file I/O objects  
Set objFSO = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)  
Set objFolder = objFSO.GetFolder(strDIR)
%>

<?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?>
<!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;>[/URL]

<html xmlns=&quot;[URL unfurl="true"]http://www.w3.org/1999/xhtml&quot;>[/URL]

<head>
<title>..//Gallery</title>
<head />
<style type=&quot;text/css&quot;>
p {font: 10px Verdana}
</style>

<body background=&quot;[URL unfurl="true"]http://myip/adult/images/gallerytemp_11.gif&quot;[/URL] leftmargin=&quot;0&quot; topmargin=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot;>
<div align=&quot;center&quot;>
<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td align=&quot;center&quot; background=&quot;[URL unfurl="true"]http://myip/adult/images/gallerytemp_01.gif&quot;>[/URL]
<img src=&quot;[URL unfurl="true"]http://myip/adult/images/gallerytemp_03.gif&quot;[/URL] width=&quot;117&quot; height=&quot;18&quot; />
</td>
</tr> 
</table>
<br />
<table border=&quot;1&quot; cellpadding=&quot;15&quot; cellspacing=&quot;15&quot; bordercolor=&quot;#666666&quot; background=&quot;[URL unfurl="true"]http://myip/adult/images/gallerytemp_11.gif&quot;>[/URL]
<%
For Each objFile In objFolder.Files
	IF InStr(objFile.Name,&quot;img_&quot;)=1 THEN
	If filecounttable = 0  Then
	Response.Write &quot;<tr>&quot;
	filecounttable = 1
	End If
	If filecounttable < 4  Then
	Response.Write &quot;<td bgcolor=#FFFFFF><a href=&quot; & objFile.Name & &quot; target=_blank><img src=thumbs/th_&quot; & objFile.Name & &quot; width=100 height=100 border=1></td>&quot; & vbCrLf
	filecounttable = filecounttable +1
	Else
	Response.Write &quot;<td bgcolor=#FFFFFF><a href=&quot; & objFile.Name & &quot; target=_blank><img src=thumbs/th_&quot; & objFile.Name & &quot; width=100 height=100 border=1></td></tr>&quot; & vbCrLf
	filecounttable = 0
	End If
	End If
	Next
	%>  
	</table><br />  
	<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
	<tr>
	<td align=&quot;center&quot; background=&quot;[URL unfurl="true"]http://myip/adult/images/gallerytemp_01.gif&quot;>[/URL]
	<img src=&quot;[URL unfurl="true"]http://my[/URL] ip/adult/images/gallerytemp_03.gif&quot; width=&quot;117&quot; height=&quot;18&quot; />
	</td>
	</tr>
	</table>
	</div>
	</body>
	</html>
 
Ok I fixed it the problem is norton anti-virus's script blocking, blocks the filesystemobject.

Its all good now
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top