The place where your exe is is the root of the application.
You can use string appPath = Path.GetDirectoryName(Application.ExecutablePath);to get the path to the application.
If you want to find the folder where the solution is located, I suggest starting with exe and then going to the directory tree until you get to the folder containing the .sln file. Not too sure why you would like to do this, though.
EDIT: , asp.net. ( ):
public static string MappedApplicationPath
{
get
{
string APP_PATH = System.Web.HttpContext.Current.Request.ApplicationPath.ToLower();
if(APP_PATH == "/")
APP_PATH = "/";
else if(!APP_PATH.EndsWith(@"/"))
APP_PATH += @"/";
string it = System.Web.HttpContext.Current.Server.MapPath(APP_PATH);
if(!it.EndsWith(@"\"))
it += @"\";
return it;
}
}