Can I link to a network file from the intranet I work on?
Not sure what code I need to get this to work, to link to
\\server\printer\file
Any ideas?
Thanks
Josh
Printable View
Can I link to a network file from the intranet I work on?
Not sure what code I need to get this to work, to link to
\\server\printer\file
Any ideas?
Thanks
Josh
Depends on whether there is a direct route via any proxy servers to the intranet and whether it is protected in any way. In most cases I'd say no as it will be locked down for security unless parts of your intranet are available to the internet and in those cases most of them are behind an SSL VPN connection
In short, I'd say no although I don't know your company's architecture
that should work fine, assuming you are accessing a file on the same network you are running the intranet on. Surely it only takes 30 seconds to try it though? just create a random page with the URL and try it.
what code should i be using though? is this the right code, because it doesn't seem to want to work. it is on the same network but not the same domain ...
Code:<a href="file://server/folder/file">link</a>
not same domain then its not going to have access rights at all. Especially not from the service that is running the command.
TiG
is that mapped to a drive letter on the server the Intranet is running?
You could use IS streams within ASP/ASP.NET to send the file, you can do this to any file the server has access to but the webuser does not. I can't give you any more details on it as i still need to get it working on a website i've got.
the file:// transfer protocol may not work depending on the network restrictions. Where do you want the link to be, on a web page or on some other mechanism. If it's on a web page then using a <a> tag is the right approach but it might be better to put the file on an FTP or web server so you can use FTP or HTTP to get it.
I've managed to get it working, turns out that the files had .lnk on the end of them, (hidden by windows), and it's only working properly in Internet Explorer, using file://server/path/file.lnk
how can you be a developer of any description with the hide-file-extension turned on in explorer ;)
it was turned off but it still hid the .lnk bit of the file. try it yourself - all shortcut file extensions (.lnk) are hidden regardless of window settings. :)Quote:
Originally Posted by Funkstar
i haven't used a shortcut in years, i'll take your word for it :)