Server hangs on Me
Hi to every one. I am new to this forum I just start learning ASP programming. by using Beginning Active Server Page 3.0 So far I have manage to run all the code in the book but one code in chapter No.10 page No:390 is giving me real hard time. when I am trying to execute this code my server is just hang up on me dont give me any error or any out put just blank page. on the explorer left bottom corner message appear website found waiting for reply that's all. I have tryed this code with and without Directory browsing option on and off in virtual Directory configration. I am writing the code as follow if any of you know why it's not giving me any inforamtion out please let me know. Also I am using Windows XP Pro with Office XP
<HTML>
<HEAD>
<TITLE>Chapter 10 Example - Display Directory</TITLE>
</HEAD>
<BODY>
<%
Dim strPathInfo, strPhysicalPath
strPathInfo = Request.ServerVariables("PATH_INFO")
strPhysicalPath = Server.MapPath(strPathInfo)
Dim objFSO, objFile, objFileItem, objFolder, objFolderContents
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(strPhysicalPath)
Set objFolder = objFile.ParentFolder
Set objFolderContents = objFolder.Files
%>
<TABLE cellpadding=5>
<TR align=center>
<TH align=left>File Name</TH>
<TH>File Size</TH>
<TH>Last Modified</TH>
</TR>
<%
For Each objFileItem In objFolderContents
Response.Write "<TR><TD align=left>"
Response.Write objFileItem.Name
Response.Write "</TD><TD align=right>"
Response.Write objFileItem.Size
Response.Write "</TD><TD align=right>"
Response.Write objFileItem.DateLastModified
Response.Write "</TD></TR>"
Next
%>
</TABLE>
</BODY>
</HTML>
Zahid Hussain
|