using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using Everest.Library.ExtensionMethod;
using Everest.Library;
using Everest.CmsServices.Providers;
using System.Collections.Specialized;
namespace Everest.CmsServices.Rfc.WebDAV{
public class WebDavHelper
{
public static string GetCurrentUrl(HttpRequest request)
{
var url = BuildAbsoluteUrl(GetRawHostUrl(request), request.RawUrl);
return url;
}
public static string GetRawHostUrl(HttpRequest request)
{
return "http://" + request.GetRawHost();
}
public static string BuildAbsoluteUrl(string baseUrl, string relativeUrl)
{
var url = new Uri(new Uri(baseUrl), relativeUrl).ToString();
//if (!url.EndsWith("/"))
//{
// url = url + "/";
//}
return url;
}
public static string GetUserName(HttpApplication application)
{
return "admin";// application.User.Identity.Name;
}
}
}
|