I want to open a txt file and read from it here’s the code:
StreamReader reader = File.OpenText("TrackData/vehicle_points.txt");
TrckData is a folder in my web application.
but i get this error :
Could not find a part of the path ‘C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0\TrackData\vehicle_points.txt’.
My project is not even in C Driver, I don’t know where it gets that url.
ASP.Net applications are stored in a different folder, and here you have given a relative which may vary according to asp.net executable path.
Please use
this will surely work..