c# - “No Application is associated with specified file for this operation”

标签 c# asp.net .net windows browser

我正在使用 Process 从我的窗口应用程序(.net 3.5 框架,C#)打开一个网站(比方说 www.google.com)。启动方法。它在所有机器上工作正常,但在一台机器上显示错误“没有应用程序与此操作的指定文件相关联”。

最佳答案

Process process = new Process();

process.StartInfo = new ProcessStartInfo("https://www.google.lk", string.Empty);
process.StartInfo.Verb = string.Empty;

process.Start();

以上代码完全满足您的要求。

关于c# - “No Application is associated with specified file for this operation”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26140406/

相关文章:

c# - 找不到类型或命名空间名称 'UI'。 c#Unity3d

c# - Telerik radwindow 位置

c# - 如何将 Json 参数绑定(bind)到 ASP.NET 中的 Web Api 参数?

.net - 如何知道在 Windows 服务中打开了多少个 SQL 连接?

c# - 最后用空值排序

c# - WPF 数据绑定(bind)组合框到列表<string>

c# - MathML 的数学表达式

c# - 在 C# 程序集中的何处存储敏感数据?

c# - 如何在 ASP.Net 中使用子控件集合创建控件

.net - 我可以使默认的AppDomain使用某些程序集的卷影副本吗?