我似乎有一个奇怪的问题与System.Diagnostics.Process.Start方法。我有一个使用3.5 SP1 .NET Framework的C#桌面应用程序。用户点击一个标签,该标签将存储在其标签中的文件夹路径作为字符串传递给函数。 Windows资源管理器启动正确的文件夹。当此工具安装在Citrix上并通过已发布的应用程序运行时,Windows资源管理器仍将启动,但也会显示一个.NET异常消息“系统找不到指定的文件”。存在System.Diagnostics.Process.Start问题
System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(String fileName)
文件路径,因为它是刚刚推出就OK和代码工作没有错误时到服务器上本地登录,它只是错误,因为发布的应用程序,我的代码如下
Label label = (Label)sender;
if (label.ForeColor == Color.Blue) {
if (System.IO.Directory.Exists(label.Tag.ToString()) == false)
{
MessageBox.Show("The specified folder does not exist:" +
Environment.NewLine + Environment.NewLine + label.Tag.ToString(), "",
MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
System.Diagnostics.Process.Start(label.Tag.ToString());
}
我发现这个页面http://forums.citrix.com/thread.jspa?messageID=1382638,但我们没有在服务器上的IIS。
任何人都可以帮忙吗?
感谢, 罗布
你的意思是让用户进入到一个网页,点击安装,你已经做了Web部署? – GenericTypeTea 2009-09-10 10:09:05
否这是由Citrix作为已发布应用程序发布的桌面应用程序。桌面应用程序中有链接,它在各个文件夹位置启动Windows资源管理器 – rob 2009-09-10 10:11:31
这些文件夹位于网络驱动器上。完整的地址(例如域名等)用于传递到启动功能。 Citrix服务器可以访问文件夹区域。 只是为了确认Windows资源管理器确实从此功能启动到正确的文件夹。一旦Windows资源管理器启动,就会出现异常消息。 – rob 2009-09-10 11:12:38