string _PageUrlPort=Context.Request.Url.Port.ToString();
if (_PageUrlPort=="80") { _PageUrlPort="";} else {  _PageUrlPort=":"+_PageUrlPort; }string _ApplicationPath=Context.Request.ApplicationPath.ToString();
if (_ApplicationPath=="/") { _ApplicationPath="";} _PageUrlBase=@"http://"+Context.Request.Url.Host+ _PageUrlPort + _ApplicationPath;
//sample :http://192.168.0.1/server (no "/" at the root)_PhysicPath=Context.Request.PhysicalApplicationPath;
//EX: D:\Test\Test1\够详细了吧