Issue: "Illegal characters in path"

  • When requesting the child properties of System.Diagnostics.Process.MainModule.FileVersionInfo for winlogon.exe, the .NET runtime throws the error "Illegal characters in path" with the following stack trace:

at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.Path.GetFullPath(String path)
at System.Diagnostics.FileVersionInfo.GetFullPathWithAssert(String fileName)
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at System.Diagnostics.ProcessModule.get_FileVersionInfo()
at CacheMyWork.ProcessesBusinessLogic.GetProcessDescriptiveName(Process process)
at CacheMyWork.ProcessesBusinessLogic.BuildProcessesCollection()

This is because the System.Diagnostics.Process.MainModule.FileName returned for winlogon.exe is "\??\C:\WINDOWS\system32\winlogon.exe".

The only discussion I could find on the MSDN Forums that asks about this issue is this one, and I've updated the thread with the details of the issue found here.

Last edited Mar 23, 2008 at 1:59 AM by MikeSL, version 4

Comments

No comments yet.