当前位置:编程学习 > C#/ASP.NET >>

System.Diagnostics.Process.Start

System.Diagnostics.Process.Start("Explorer.exe", "http://www.baidu.com");到项目中运行可以实现。
但是项目部署到IIS上面就无反应。可能是权限的问题。

之后我改成如下
 Process objpro = new Process();
        objpro.StartInfo.UseShellExecute = false;
        objpro.StartInfo.Domain = "domain";
        objpro.StartInfo.UserName = "Administrator";
        string strPWD = "123";
        SecureString password = new SecureString();
        foreach (char c in strPWD.ToCharArray())
        {
            password.AppendChar(c);
        }
        objpro.StartInfo.Password = password;
        objpro.StartInfo.FileName = "Explorer.exe";
        objpro.StartInfo.Arguments = "http://www.baidu.com/";
        objpro.Start();  
还是没有反应。 --------------------编程问答-------------------- 没遇到过,是Winform程序吗,为什么要部署到iss上?
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,