window.open("c:\test.txt") from Silverlight

Posted by queen3 on Stack Overflow See other posts from Stack Overflow or by queen3
Published on 2010-05-11T09:18:44Z Indexed on 2010/05/11 9:24 UTC
Read the original article Hit count: 438

I'm trying to open local file from Silverlight. I try Window.Navigate("c:\test.pdf", "_blank") and invoking JavaScript like this:

window.open("c:\test.pdf", "_blank")

Both give "Access is denied".

However it works in plain HTML when I do

<input type="button" value="test" 
       onclick="window.open('c:\test.pdf', '_blank')" />

Is it Silverlight security restriction? Can I open a local file in a browser from Silverlight application?

The reason behind this is that users store local paths and want to open those files from the app.

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about silverlight-3.0