I tried doing that by various method but an exception pop-ups. My lync silverlight application works fine in browser or out of browser (with elevated permissions) but when I try to do so in lync's window extension (CWE) is throws an exception saying "File operation not permitted. Access to path '<some path>' is denied". Please help!
private void button1_Click(object sender, RoutedEventArgs e) { try { if (!string.IsNullOrEmpty(textBox1.Text)) { string path = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "abc.txt"); StreamWriter writer = File.CreateText(path); writer.Write(textBox1.Text); writer.Close(); } } catch (Exception ee) { MessageBox.Show(ee.Data + "\n\n" + ee.Message); } }