using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Everest.CmsServices.MvcHelper;
namespace Everest.CmsServices.Controllers{
public class RSDController : Controller
{
public ActionResult Index()
{
string xml = @"<?xml version=""1.0"" encoding=""utf-8"" ?>
<rsd version=""1.0"" xmlns=""http://archipelago.phrasewise.com/rsd"">
<service>
<engineName>Kooboo CMS</engineName>
<engineLink>http://www.kooboo.com/</engineLink>
<homePageLink>{0}</homePageLink>
<apis><api name=""MetaWeblog"" preferred=""true"" apiLink=""{0}/Metaweblog.ashx"" application=""{1}""/></apis>
</service>
</rsd>
";
var request = (Everest.CmsServices.Web.KoobooHttpRequestWrapper)Request;
var applicationName = "root";
var homePageLink = string.Format("{0}://{1}{2}", request.Url.Scheme, request.Url.Authority, request.ApplicationPath);
if (request.CmsApplication != null)
{
applicationName = request.CmsApplication.ApplicationName;
homePageLink = Url.ApplicationUrl(applicationName);
}
ContentResult contentResult = new ContentResult();
return Content(string.Format(xml, homePageLink, applicationName), "text/xml");
}
}
}
|