Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 28th, 2005, 05:38 AM
Registered User
 
Join Date: Mar 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to z323791 Send a message via Yahoo to z323791
Default 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
 
Old March 28th, 2005, 07:19 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

That code works. It will display the dir contents where it is saved.

;;;I have tryed this code with and without Directory browsing option on and off in virtual Directory configration.

Changing these will not have an impact on the code running - or not

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Visio process hangs mithila Classic ASP Components 0 July 28th, 2008 04:56 AM
ETL hangs when scheduled raghs_rmk SQL Server DTS 2 October 25th, 2006 09:28 AM
Why an ETL hangs when scheduled surileo SQL Server DTS 1 March 10th, 2005 02:56 AM
localhost - hangs Gardener Classic ASP Basics 2 July 14th, 2004 04:42 PM
My Program Hangs! zaimi Visual C++ 1 May 21st, 2004 06:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.