I am working in asp.net and C#. I have made a class library (dll) in which i have placed my connection objects.
There for some reason i need to reach the path of my server which is http://localhost/project/ . I want to access a file placed in this directory.
I tried System.IO's Directory.GetCurrentDirectory but it takes me to C:\Winnt\System32. And in the explanation at msdn it says this function takes you to the current directory and not to the original directory where the file you running is placed.
So actually i want to go to the original directory.
Any help in this regard will be highly appreciated.
As for Server.MapPath() it doesn't run in the refrenced class library ... so i have to do it somehow with system.IO but not getting to it.
Regards,
Harris Moin


Reply With Quote