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

Virtual Directory - Path Not Found - Sometimes

Status
Not open for further replies.

TaltosVT

Technical User
Nov 15, 2004
10
US
I have an ASP page that lists the directory contents of a Virtual Directory that sits on a server seperate from the IIS server.

The problem that occurs is that sometimes the users will recieve a "Path Not Found" error. A few minutes later, they may hit refresh and everything will be working normally. Then again, it may not. I can't reproduce the error consistantly.

The two servers are on the same domain, though on opposite ends of a WAN. My code is below. Any ideas on what might be going wrong?

-----------------------------------------------------------

<%
department = "Fullfillment"
title = department & " Home"

%>
<!-- #include virtual="inc/header.inc" -->

<!-- #include virtual="inc/default.inc" -->

<%
' ******* Set Source of Daily Production Reports *******
SourcePath = "Daily Production Report"
ReportType = "Daily Production"

PrintList(SourcePath) ' Call PrintList

'******* Set Source of Montly Production Reports *******
SourcePath = "WIS & LOO Report"
ReportType = "Monthly"

PrintList(SourcePath) ' Call PrintList

'******* PrintList Sub-function *******
'* Takes SourcePath Arguement and maps*
'* a path to the proper directory, *
'* then creates a clickable list of *
'* files in that folder. *
'**************************************
Sub PrintList(SourcePath)

' path = Server.Mappath(SourcePath)
path = "\\server\DCCommon\FULFILL\" & SourcePath

Response.Write(path)

Dim fs, folder
SET fs = CreateObject("Scripting.FileSystemObject")
SET folder = fs.GetFolder(path)
' SET folder = fs.GetFolder(path) %>

<TABLE BORDER="0" WIDTH="100%" CELLPADDING="5" CELLSPACING="0">
<TR>
<TD class="body">

<B><%=ReportType %> Reports:</B><BR><BR>

<TABLE BORDER="0" WIDTH="100%" CELLPADDING="2" CELLSPACING="0" CLASS="body">

<TR ALIGN="LEFT" VALIGN="TOP">

<% Counter = 0

FOR EACH item IN folder.files

If Counter = 2 Then
Response.write("</TR><TR><TD COLSPAN=2> </TD></TR><TR>")
Counter = 0
End If

%>

<TD>

<% printFolder(item)

Counter = Counter + 1 %>

</TD>

<% NEXT %>

</TR>

</TABLE>

</CENTER>

</TD></TR></TABLE>

<% END SUB

' ======================================================================
' ====================================================================== %>
<!-- #include virtual="inc/footer.inc" -->

<%

SUB printFolder(item)

FileName = item.Name
L = Len(FileName) - 4
FileName1 = Left(FileName, L) %>

<!-- <A HREF=" SourcePath & "/" & FileName %>"><%= FileName1 %></A> -->

<A HREF="file:\\server\DCCommon\FULFILL\<%= SourcePath & "\" & FileName %>"><%= FileName1 %></A>

<BR>


<% END SUB %>
 
Maybe there is a timeout when the network is busy?
 
Or if someone reboots or runs some resource intesive operation on the remote box?

Maybe write a little EXE to ping the remote host every 15 seconds and log the results...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top