Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Accessing special folders from Silverlight OutOfBrowser application
- var folder = Environment.GetFolderPath(Environment.SpecialFolder.Templates);
- System.Security.SecurityException was unhandled by user code
- Message=File operation not permitted. Access to path '' is denied.
- StackTrace:
- at System.IO.FileSecurityState.EnsureState()
- at System.Environment.InternalGetFolderPath(SpecialFolder folder, SpecialFolderOption option, Boolean checkHost)
- at System.Environment.GetFolderPath(SpecialFolder folder)
- using (dynamic fso = AutomationFactory.CreateObject("Scripting.FileSystemObject"))
- {
- dynamic file = fso.CreateTextFile(@"C:tmp.txt");
- file.WriteLine(@"I just wrote to c: !!");
- file.Close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement