Posted on: 7/22/2015 5:57:16 PM | Views : 784

I'm tasked with working on an old ASP.NET Web Forms app. It uses .NET 2.0. The original developer didn't bother using the Web.Config file for anything. He put database connection strings, passwords, etc. all within a .ini file which he put into the C:\Windows\System32 folder. So that's where I have to put the same file on my development box. If I had the time I'd redo everything and use the Web.Config, but I don't have the time. I've just got to get this thing to work.
When I pull this application into VS 2013 and run it, it always fails to find the file, even though it definitely exists where it should be. Here's the code snippet from the code behind:
If Not File.Exists(FileName) Then Throw New System.Exception("ERROR: Configuration file [ " & FileName & " ] not found") End If When I run the app and stop it in the debugger at this point the variable FileName is: C:\Windows\System32\timetrac ...

Go to the complete details ...