What used to work for me, when I would check if File.Exists now returns a false.
We recently updated to the 4.0 — and now any files within my personal User folder return FALSE for File.Exists.
Anyone experience this or know of the issue?
(For example – (File.Exists(“C:\Users\Public\test.txt”)) will equal TRUE but (File.Exists(“C:\Users\peronalFolder.domain\test.txt”)) always comes back FALSE)
Thanks.
It is highly unlikely that
File.Existschanged. It is more likely that your environment changed. I would recommend looking into your App Pool settings (if relevant) as @Jesse mentioned.You can attempt to identify if it is a .NET issue or an environmental issue by using the following powershell script as a unit test for file access: