How to obtain the application URL

Unofficial Content
using Artech.Genexus.Common; 
using Artech.Genexus.Common.Entities; 
using Artech.Common.Properties; 

[...] 

string GetWebRoot() 
{ 
GxModel gxModel = UIServices.KB.CurrentKB.WorkingModel.GetAs<GxModel>(); 
return PropertyAccessor.GetPropertyValue(gxModel.Environment, Properties.CSHARP.WebRoot); 
}