Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 19, 2012 01:21 PM by bbcompent1
Apr 19, 2012 01:04 PM|LINK
<a href=@C:\TMP\worksheet.xlsx>Click me too</a>
is resolved as "http://localhost/WebApplication2/@C:/TMP/worksheet.xlsx" and can't be accessed in any way.
Who'd ever told me that opening a file from browser can be such a disaster :(
Thanks for trying to help me.
Apr 19, 2012 01:08 PM|LINK
Let me see if I can cook up a code behind solution to do this. I know I've done this before but I'm hard pressed to remember how I did it.
Apr 19, 2012 01:14 PM|LINK
Using | result in same 'non-clickable' URLs
Apr 19, 2012 01:15 PM|LINK
I hate to be the voice of gloom and doom but it is just not possible:
"This is due to security restrictions in the browser. If you generate a file:// link, it is relative to the
user's file system. Theoretically, if browsers allowed these types of links, attackers could discover information about a user's file system remotely. Thus, modern browsers do not allow this type of link. Unfortunately this is not very well documented,
and most browsers allow the links and just drop the behaviour - so nothing happens when you click them. There aren't any good workarounds either."
Apr 19, 2012 01:19 PM|LINK
Hmmm, that's really strange as a simple HTML that looks like
will do the thing...
Apr 19, 2012 01:21 PM|LINK
Its unfortunate but it is a restriction that is imposed by modern web browsers.