PDA

View Full Version : Probably Easy but...


MichaelP
04-30-2009, 08:24 PM
Hi, I have not worked in ASP in a while and an easy task has turned into a pain.

My task -> I am trying to add a hyperlink to a directory on a server, from an ASP page.

Basically I have tried the following:

<li><a target="new" href='\\server7\documents\PROD_Output'>Scheduled Reports Server</a></li><br>

But when the link is clicked I get the "error:500: Server Error [00-0002]"

I think the problem is that the code is appending the server path to the ASP page URL (I see it when I hover over the hyperlink). Can anyone tell me what I am doing wrong?

Old Pedant
04-30-2009, 08:34 PM
That URL will *only* work for (a) computers on the SAME LAN as the one hosting the ASP page and (b) users that have been given access *TO* that directory by the sys admin of that machine.

But in any case, yes, you need to always use the HTTP:// prefix if you want to use a *NON*-relative URL. Has nothing to do with ASP. That's the way the browser works: No absolute prefix, then it assumes a relative URL.

NOTE: Actually, in this case you might need to use "file://" instead of "http://". If that really *is* a file, not a web page being served up by a web server. I'd try it both ways, just for starters:

<a target="_blank" href="file://\\server\documents\PROD_Output">....</a>
and also
<a target="_blank" href="http://\\server\documents\PROD_Output">....</a>


Again, in any case, not truly an ASP problem, at all.

MichaelP
04-30-2009, 09:07 PM
Thanks for the help, sorry it was not posted in the right forum, but I was not sure what the problem was.

Can I ask one more question - would there be any reason why it would work in IE 7 and not Firefox? In IE the new window pops right up, but in Firefox it displays the following in the status bar (lower left portion of the browser):

Applet DSLibraryManagerDownLoad notinited

and nothing happens.

Old Pedant
05-01-2009, 09:29 AM
What kind of document is that??

The URL, that is??

It might be one the FF doesn't handle.

The word "Applet" in there is strange. Makes it feel like FF thinks this is Java or something.

But no, I've never seen that message.

MichaelP
05-01-2009, 04:30 PM
It is a status message that displays in the Firfox browser status bar (lower left). Basically, I am trying to access a Windows directory via a hyper link to allow people to view the contents and access the documents.

Someone mentioned that this might be a Firefox limitation - you cannot access a Windows directory other than ones that exist on the server the Web page resides on.:eek:

Old Pedant
05-01-2009, 09:32 PM
You mean automatically see a list of the contents of the directory???

Yeah, might be a FF limitation.

But then why not code around it?

Use ASP/VBS code to list the directory contents, instead. Plus that allows you to control what files are shown, if you want to.

MichaelP
05-01-2009, 11:15 PM
Thanks for your help VB is probably the way to go to correct this.

:)