1

My SL5 out-of-browser application works on one computer, but not on another computer.
On both computers the application is built in, and started from, VS2012 running as Administrator.
The SecurityException occurs here:

Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)  

A possibly related issue: On the computer that throws the exception, the app runs in the default browser, while on the other computer the app runs out-of-browser.

Any insights will be appreciated...

Number8
  • 12,322
  • 10
  • 44
  • 69

1 Answers1

0

The related issue is spot on: you can't access local folders with a standard Silverlight in browser app, but you can with an OOB one.

So you have either to restrict your functionality to Out-of-Browser mode or enable elevated priviledges in browser (which is quite painful, see various questions on SO: search results).

Community
  • 1
  • 1
jv42
  • 8,521
  • 5
  • 40
  • 64
  • Thanks for the reply. Any idea on the first question: Why does the OOB app run out-of-browser on one computer, but in-browser on the other? – Number8 Dec 03 '12 at 13:45
  • If started from VisualStudio, it depends on your "startup project". If you select the app's project, it starts OOB, if you select the web project, it starts IB. – jv42 Dec 03 '12 at 13:56
  • Thaks, but: 1) The app's project is the startup project, 2) There is no explicit web project. – Number8 Dec 03 '12 at 17:33
  • Doh! I don't have a VS2012 handy with my Silverlight projects right now, so I can only make guesses. You've checked the Silverlight project settings, ie enable OOB, etc...? – jv42 Dec 04 '12 at 13:04
  • Checked and double-checked, VS2012 is running as Administrator,etc. Thanks for the reply. – Number8 Dec 04 '12 at 20:07