I'm on an Intranet, and our Intranet server is on the same domain as the
users. I have one place where I wanted to create a clickable link which
would take the user to the directory for that Ticket. So if you're on the
page for Ticket 1000, the word "Files" is surrounded by this:
<a href=\\servername\tickets\<%=strTicketid%> target="_blank">Files</a>
This works fine if the directory exists. (Not every ticket has a
corresponding folder). But if it doesn't exist, users who click the link
will get an empty window.
This is not the end of the world, but it would be nice to have the page see
if the folder exists, and if not, don't have the link.
In my testing of the FileSystemObject, using the "FolderExists", it works
fine on my machine. But not when it's on anohter machine. I have tried it
using the above naming convention, and also with the dirve letter that
everyone has mapped to this folder, and neither way works.
I went to ASPFAQ.com, but didn't find anything that addresses this
situation. 7 6646
Set your security to use Integrated authentication then your user's identity
will be used to check if the file exists rather than the local (to the
webserver) account of IUSR_machinename which, of course, has no rights to
\\servername\tickerts\1000
"middletree" <mi********@htomail.com> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl... I'm on an Intranet, and our Intranet server is on the same domain as the users. I have one place where I wanted to create a clickable link which would take the user to the directory for that Ticket. So if you're on the page for Ticket 1000, the word "Files" is surrounded by this: <a href=\\servername\tickets\<%=strTicketid%> target="_blank">Files</a>
This works fine if the directory exists. (Not every ticket has a corresponding folder). But if it doesn't exist, users who click the link will get an empty window.
This is not the end of the world, but it would be nice to have the page
see if the folder exists, and if not, don't have the link.
In my testing of the FileSystemObject, using the "FolderExists", it works fine on my machine. But not when it's on anohter machine. I have tried it using the above naming convention, and also with the dirve letter that everyone has mapped to this folder, and neither way works.
I went to ASPFAQ.com, but didn't find anything that addresses this situation.
Below is the folder exists function I use...... might be worth a try?
If ReportFolderStatus(Server.MapPath("users" & "\" & strName)) = "1" Then
'Folder exists...... do something
Else
'Folder doesn't exist..... do something else
End If
Function ReportFolderStatus(fldr)
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FolderExists(fldr)) Then
msg = "1" 'True
Else
msg = "0" 'False
End If
ReportFolderStatus = msg
End Function
--
Regards
Steven Burn
Ur I.T. Mate Group www.it-mate.co.uk
Keeping it FREE!
Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
middletree <mi********@htomail.com> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl... I'm on an Intranet, and our Intranet server is on the same domain as the users. I have one place where I wanted to create a clickable link which would take the user to the directory for that Ticket. So if you're on the page for Ticket 1000, the word "Files" is surrounded by this: <a href=\\servername\tickets\<%=strTicketid%> target="_blank">Files</a>
This works fine if the directory exists. (Not every ticket has a corresponding folder). But if it doesn't exist, users who click the link will get an empty window.
This is not the end of the world, but it would be nice to have the page
see if the folder exists, and if not, don't have the link.
In my testing of the FileSystemObject, using the "FolderExists", it works fine on my machine. But not when it's on anohter machine. I have tried it using the above naming convention, and also with the dirve letter that everyone has mapped to this folder, and neither way works.
I went to ASPFAQ.com, but didn't find anything that addresses this situation.
www.aspfaq.com/2168
--
Aaron Bertrand
SQL Server MVP http://www.aspfaq.com/
"middletree" <mi********@htomail.com> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl... I'm on an Intranet, and our Intranet server is on the same domain as the users. I have one place where I wanted to create a clickable link which would take the user to the directory for that Ticket. So if you're on the page for Ticket 1000, the word "Files" is surrounded by this: <a href=\\servername\tickets\<%=strTicketid%> target="_blank">Files</a>
This works fine if the directory exists. (Not every ticket has a corresponding folder). But if it doesn't exist, users who click the link will get an empty window.
This is not the end of the world, but it would be nice to have the page
see if the folder exists, and if not, don't have the link.
In my testing of the FileSystemObject, using the "FolderExists", it works fine on my machine. But not when it's on anohter machine. I have tried it using the above naming convention, and also with the dirve letter that everyone has mapped to this folder, and neither way works.
I went to ASPFAQ.com, but didn't find anything that addresses this situation.
That's the article I had already been to before making this post.
thanks
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:O9**************@TK2MSFTNGP09.phx.gbl... www.aspfaq.com/2168
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/
"middletree" <mi********@htomail.com> wrote in message news:uh**************@TK2MSFTNGP12.phx.gbl... I'm on an Intranet, and our Intranet server is on the same domain as the users. I have one place where I wanted to create a clickable link which would take the user to the directory for that Ticket. So if you're on
the page for Ticket 1000, the word "Files" is surrounded by this: <a href=\\servername\tickets\<%=strTicketid%> target="_blank">Files</a>
This works fine if the directory exists. (Not every ticket has a corresponding folder). But if it doesn't exist, users who click the
link will get an empty window.
This is not the end of the world, but it would be nice to have the page see if the folder exists, and if not, don't have the link.
In my testing of the FileSystemObject, using the "FolderExists", it
works fine on my machine. But not when it's on anohter machine. I have tried
it using the above naming convention, and also with the dirve letter that everyone has mapped to this folder, and neither way works.
I went to ASPFAQ.com, but didn't find anything that addresses this situation.
Thanks everyone. Turned out to be a setting on IIS.
"middletree" <mi********@htomail.com> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl... I'm on an Intranet, and our Intranet server is on the same domain as the users. I have one place where I wanted to create a clickable link which would take the user to the directory for that Ticket. So if you're on the page for Ticket 1000, the word "Files" is surrounded by this: <a href=\\servername\tickets\<%=strTicketid%> target="_blank">Files</a>
This works fine if the directory exists. (Not every ticket has a corresponding folder). But if it doesn't exist, users who click the link will get an empty window.
This is not the end of the world, but it would be nice to have the page
see if the folder exists, and if not, don't have the link.
In my testing of the FileSystemObject, using the "FolderExists", it works fine on my machine. But not when it's on anohter machine. I have tried it using the above naming convention, and also with the dirve letter that everyone has mapped to this folder, and neither way works.
I went to ASPFAQ.com, but didn't find anything that addresses this situation.
And, what part of the article did you implement? On the system where the
share is physically hosted, you created an account with IUSR_machinename
(for the machinename where this doesn't work), synchronized the passwords on
both the hosting machine and the machine that is trying to access it, and it
still doesn't work? What does "doesn't work" mean? Do you get an error
message? If so, what is it? Without knowing what "neither way works"
means... and of course, whether or not you actually implemented the
suggestion in the link I sent, we would not be able to determine what is
wrong, never mind how to fix it.
--
Aaron Bertrand
SQL Server MVP http://www.aspfaq.com/
"middletree" <mi********@htomail.com> wrote in message
news:u#*************@TK2MSFTNGP11.phx.gbl... That's the article I had already been to before making this post.
Well, I didn't think it was incumbent upon me to list every step I did in
trying to solve this, but here goes:
In the article referenced, the first section is titled "If the file is
outside your LAN"
so we can rule that out.
The next section is for those who have files inside the LAN. The first line,
about using Windows Authentication, does apply to me, so I click that, and I
get a MS KB article which says what to do if you get any of a list of
errors, but I wasn't getting any. I was just getting that the folder doesn't
exist, even if it does.
Back to the article: I can rule out Novell, and the virtual server stuff. I
stop at this point and make my post.
I then go into IIS and see that on one machine, I have Integrated Windows
Authentication checked, and on the one where I was having the problem, it
wasn't. So I checked it and all is fine.
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:ON**************@TK2MSFTNGP09.phx.gbl... And, what part of the article did you implement? On the system where the share is physically hosted, you created an account with IUSR_machinename (for the machinename where this doesn't work), synchronized the passwords
on both the hosting machine and the machine that is trying to access it, and
it still doesn't work? What does "doesn't work" mean? Do you get an error message? If so, what is it? Without knowing what "neither way works" means... and of course, whether or not you actually implemented the suggestion in the link I sent, we would not be able to determine what is wrong, never mind how to fix it.
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/
"middletree" <mi********@htomail.com> wrote in message news:u#*************@TK2MSFTNGP11.phx.gbl... That's the article I had already been to before making this post.
This discussion thread is closed Replies have been disabled for this discussion. Similar topics
reply
views
Thread by Marcelo Rizzo |
last post: by
|
5 posts
views
Thread by John Dewbert |
last post: by
|
4 posts
views
Thread by StumpY |
last post: by
|
10 posts
views
Thread by Mayolo Juarez via DotNetMonster.com |
last post: by
|
5 posts
views
Thread by Josh Rolfe |
last post: by
|
2 posts
views
Thread by bteclt |
last post: by
|
1 post
views
Thread by Sbroeff |
last post: by
|
3 posts
views
Thread by =?Utf-8?B?VG9kZA==?= |
last post: by
| | | | | | | | | | | |