The location where your exe is, is the root of the application.
You can use string appPath = Path.GetDirectoryName(Application.ExecutablePath);
to get the application path.
If you want to find the folder the solution is in, i suggest starting at the exe location, then walking up the directory tree until you get to a folder containing a .sln file. Not too sure why you'd like to do this though.
EDIT: Just figured out you're creating an asp.net site. In which case you should be able to use below (found here):
public static string MappedApplicationPath
{
get
{
string APP_PATH = System.Web.HttpContext.Current.Request.ApplicationPath.ToLower();
if(APP_PATH == "/") //a site
APP_PATH = "/";
else if(!APP_PATH.EndsWith(@"/")) //a virtual
APP_PATH += @"/";
string it = System.Web.HttpContext.Current.Server.MapPath(APP_PATH);
if(!it.EndsWith(@"\"))
it += @"\";
return it;
}
}