M
middletree
I asked this a few weeks ago, but still haven't gotten an answer. Really
stumped.
Intranet app, for tech support, and this app tracks the progress of tickets.
Sometimes, the customer will send us some trace files or logs, so we have a
folder called Tickets on a server on our network. If a ticket number is
1000, then the folder will be called T1000. So I have a link to that
directory that looks like this:
<% SET fso = CreateObject("Scripting.FileSystemObject")
strTraceDir = "\\servername\Tickets\T"&strTicketID
If fso.FolderExists(strTraceDir) then
Else
strTraceDir = "\\servername\Tickets\"
End if
set fso= nothing
%>
<a href="<%=strTraceDir%>" target="_blank">Files:</a>
As you can see, I cannot just assume that there is a folder with a specific
number. Perhaps Ticket 1000 doesn't have a folder yet. If not, then I want
to allow the link to take you to just the root of that drive.
Here's the problem: On my dev machine, this code works fine. When I upload
it to production, the FolderExists part never, ever comes into play. In
other words, it always falls into the Else condition, every time. It's as if
you can't see the folder from the server. But I have checked into that and
you can see it just fine. I also tried to see if the fact that it wasn't
mapped as a drive might be the problem, but I don't think that's it. I also
checked to see that the IUSR account info is the same on both. IIS settings
seem to be the same.
If my code just didn't work, I could deal with that. But the fact that it
doesn't work on production, but does work from my dev machine, both of which
are on the same domain, and both of which have the same permissions, is what
I am not getting.
stumped.
Intranet app, for tech support, and this app tracks the progress of tickets.
Sometimes, the customer will send us some trace files or logs, so we have a
folder called Tickets on a server on our network. If a ticket number is
1000, then the folder will be called T1000. So I have a link to that
directory that looks like this:
<% SET fso = CreateObject("Scripting.FileSystemObject")
strTraceDir = "\\servername\Tickets\T"&strTicketID
If fso.FolderExists(strTraceDir) then
Else
strTraceDir = "\\servername\Tickets\"
End if
set fso= nothing
%>
<a href="<%=strTraceDir%>" target="_blank">Files:</a>
As you can see, I cannot just assume that there is a folder with a specific
number. Perhaps Ticket 1000 doesn't have a folder yet. If not, then I want
to allow the link to take you to just the root of that drive.
Here's the problem: On my dev machine, this code works fine. When I upload
it to production, the FolderExists part never, ever comes into play. In
other words, it always falls into the Else condition, every time. It's as if
you can't see the folder from the server. But I have checked into that and
you can see it just fine. I also tried to see if the fact that it wasn't
mapped as a drive might be the problem, but I don't think that's it. I also
checked to see that the IUSR account info is the same on both. IIS settings
seem to be the same.
If my code just didn't work, I could deal with that. But the fact that it
doesn't work on production, but does work from my dev machine, both of which
are on the same domain, and both of which have the same permissions, is what
I am not getting.