I have a web project like:
namespace Web { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, Event
When ASP.net builds your site it outputs build assemblies in its special place for them. So getting path in that way is strange.
For asp.net hosted applications you can use:
string path = HttpContext.Current.Server.MapPath("~/App_Data/somedata.xml");