Hi,
I seem to have a weird issue with the System.Diagnostics.Process.Start method. I have a C# Desktop application using 3.5 SP1 .NET Framework. A user clicks on a label which passes a folder path stored in it's tag as a string to the function. Windows Explorer launches with the correct folder. When this tool is installed on Citrix and is run through a published application, Windows Explorer will still launch but a .NET exception message is also displayed "The System cannot find the file specified".
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)
The file path exists as it's just launched it ok and the code works with no errors when logged locally onto the server, it just errors as a published application, my code is below
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());
}
I found this page http://forums.citrix.com/thread.jspa?messageID=1382638 but we don't have IIS on the server anyway.
Can any one help?
Thanks, Rob