我想从Javascript中调用Silver Light方法。 注册了一个方法,并尝试打开一个新的Outlook电子邮件。Silverlight中的[ScriptableMember]中打开Outlook电子邮件时出错
但我收到此错误:
Error: System.NotSupportedException: This operation is not supported in the current context. at System.Windows.Browser.ManagedObjectInfo.Invoke(ManagedObject obj, InvokeType invokeType, String memberName, ScriptParam[] args) at System.Windows.Hosting.ManagedHost.InvokeScriptableMember(IntPtr pHandle, Int32 nMemberID, Int32 nInvokeType, Int32 nArgCount, ScriptParam[] pArgs, ScriptParam& pResult, ExceptionInfo& pExcepInfo)
- 我已经配置了银色的光芒项目以提升权限
这个运行在浏览器外使用的代码IA方法:
var olMail = outlook.CreateItem(0);
//olMail.To = txtTO.Text;
//olMail.Cc = txtCC.Text;
olMail.Attachments.Add(@"C:\\temp\\Test_pdf.pdf");
olMail.Subject = "Subject of email.";
olMail.HTMLBody = "This is first email.";
olMail.Display();
//olMail.Save();
//You can send a mail by using Send() method.
//olMail.Send();
谢谢,但我很困惑,为什么脂肪酶正在写文章:** http://www.devcurry.com/2011/05/silverlight-4-and-com-sending-mails.html**这是可能的? – user3009206