Lullaby service URL routing
Lullaby beta 3 introduces a service URL routing featuring. Using this feature, you can call a REST service by service name without needing to use an ASHX handler. For example, a Lullaby REST service previously accessable with an ASHX handler at http://mysite.com/rest.asxh can now be accessable via http://mysite.com/rest.
To use service URL routing instead of an ASHX handler, you'll need to do the following:
Add a reference to System.Web.Routing.
Add the following HTTP module to web.config:
<add name="Routing"
type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
In Global.asax for the REST service, add the following to Application_Start.
using System.Web.Routing;
protected void Application_Start(object sender, EventArgs e)
{
var route = new Route("myservicename/{*path}", new RestRouteHandler("myservicename"));
RouteTable.Routes.Add(route);
}




