Closed ellwoods closed 5 years ago
At the point where the exception occurs, we have made a list of each virtual directory defined for your application. We're expanding any environment variables present in the virtual directory path, and then we are doing a recursive search for web.config files.
Based on the information in the exception, I would expect that you have at least one virtual directory whose physical path is under 'C:\Repos'.
For some reason, the recursive directory search is failing and throwing the exception that you are seeing. I've not seen this happen with this code, but I've seen some interesting behavior where the file system contains symlinks or junctions that could result in a loop when following the path. I'm not sure if that's what's happening here (I would expect an overflow in that case), but it might be something to look for.
Could you please search through your applicationhost.config and any web.configs to see what virtual directories are defined?
Thanks, -Wade
Wade, thanks for getting back to me. I've now realised that this was caused by my error. The issue occurred because the physical path didn't exist and I have now resolved the problem. Apologies for the inconvenience.
Regards
Steve
Investigative information
Please provide the following:
Repro steps
Provide the steps required to reproduce the problem: happens immediately on startup
Expected behavior
Provide a description of the expected behavior. The application doesn't error
Actual behavior
Provide a description of the actual behavior observed. Exception thrown - Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Repos\Data.AfLookup\Data.AfLookup\Data.AfLookup'. at System.IO.Enumeration.FileSystemEnumerator
1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) at System.IO.Enumeration.FileSystemEnumerator
1..ctor(String directory, EnumerationOptions options) at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options) at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options) at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) at migcheck.BuildApplicationMap.InitializeApplication(Site Site, Application Application) in D:\a\1\s\src\MigrationTool\migcheck\BuildApplicationMap.cs:line 93 at migcheck.BuildSiteMap.InitializeSite(Site Site) in D:\a\1\s\src\MigrationTool\migcheck\BuildSiteMap.cs:line 152 at migcheck.BuildServerMap.InitializeServerMap() in D:\a\1\s\src\MigrationTool\migcheck\BuildServerMap.cs:line 67 at migcheck.Program.Main(String[] args) in D:\a\1\s\src\MigrationTool\migcheck\Program.cs:line 123I'm not sure where it's picking this folder up from, it contains my repos which are largely not Git.
This error appears to be different to issue #6
Known workarounds
Provide a description of any known workarounds. none found