We have a Silverlight Client that has among others two requirements: - Open files on the local network (by using UNC on windows and SMB on mac) - Drag and drop files from Explorer/Finder onto the SL client.
Opening files (using UNC) works fine on windows, either by using IE, FireFox (with some adjustment) or by using COM automation Out Of Browser.
On Mac, this has turned out to be difficult; Out Of Browser on Mac has no “elevated trust features“ (equivalent to COM automation on windows), so in OOB on Mac the HyperlinkButton control is the only way to open a files (uri’s), but this throws a security exception when opening "SMB files" (due to cross scheme/cross domain restrictions in SL OOB I guess). So we had to go for in-browser: Now Safari doesn’t handle this well. FireFox though can open local files if you tweak the browser to allow this. So we did.
T开发者_运维知识库he problem then was file drag and drop (which worked in Safari, but not in Firefox due to restrictions in the browser). We worked around this by creating a SL control that used the HTML Bridge to inject HTML div’s on top of the SL client that worked as droppable areas.
Since being able to open local files requires tweaking the browser, the best solution would be to have functionality to open local files OOB (equivalent to COM automation on windows, e.g. being able to run AppleScript).
Is something like this possible? Is it possible somehow to open a file by SMB on a Mac in OOB?
Thanks.
PS: So we kind of had a working solution on Mac by running in browser using FireFox 5 (tweaked to allow opening local files) – until we ran into a much more serious problem that looked like a serious rendering issue in the SL plugin for FireFox on Mac; this problem is posted here: Silverlight rendering issue in Firefox 4 and 5 on MacBooks
I think what you are looking for is haw to enable trusted Silverlight application to run inside the browser . There is a solution for windows. And I don't know how can we do it in MAC .
READ :
http://msdn.microsoft.com/en-us/library/gg192793(v=vs.95).aspx
http://www.simple-talk.com/dotnet/.net-framework/elevated-trust-in-silverlight-4/
精彩评论