C# 什么会导致进程崩溃。是否开始使用mailto:地址使应用程序崩溃?
不确定这是为什么,但下面的一行使我们的WPF应用程序崩溃C# 什么会导致进程崩溃。是否开始使用mailto:地址使应用程序崩溃?,c#,wpf,url,mailto,process.start,C#,Wpf,Url,Mailto,Process.start,不确定这是为什么,但下面的一行使我们的WPF应用程序崩溃 Process.Start(“mailto:example@stackoverflow.com"); 例外情况如下: System.ComponentModel.Win32Exception HResult=0x80004005 Message=The system cannot find the file specified. Source=System.Diagnostics.Process StackTrace:
Process.Start(“mailto:example@stackoverflow.com");
例外情况如下:
System.ComponentModel.Win32Exception
HResult=0x80004005
Message=The system cannot find the file specified.
Source=System.Diagnostics.Process
StackTrace:
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
注意:没有报告“InnerException”
我已经通过使用mailto:
hyperlink来编写这个简单的HTML文件来确认邮件处理程序已正确注册,以测试
单击链接,邮件客户端将按预期打开
根据网站上的另一篇帖子,我也尝试了混合交互方法,导入了这个
xmlns:i=”http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:ei=”http://schemas.microsoft.com/expression/2010/interactions"
然后像这样使用它
但我也有同样的例外
那么是什么原因导致了这种情况呢?尝试设置UseShellExecute:
System.Diagnostics.Process.Start(new ProcessStartInfo("mailto:example@stackoverflow.com") { UseShellExecute = true });
UseShellExecute
可能是false
。