it's difficult for me to debug this as presumably you're using the old blogs and there were some changes made since then. Here is a piece of code based on the beta2 that you can try
WelcomeController.cs
using System.Linq;
using System.Text;
using System.Web.Mvc;
using DotNetNuke.Web.Services;
namespace SDNServices
{
public class WelcomeController : DnnController
{
[DnnAuthorize(AllowAnonymous = true)]
public string HelloWorld()
{
return "Hello World-!";
}
[DnnAuthorize(AllowAnonymous = true)]
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult CheckSecurity()
{
return Json("method can be ran by anonymous users but requires post", JsonRequestBehavior.DenyGet);
}
[DnnAuthorize(AllowAnonymous = true)]
[ValidateAntiForgeryToken()]
public ActionResult DoubleNumber(int doubleMe)
{
int doubled = doubleMe*2;
return Json(doubled.ToString(), JsonRequestBehavior.AllowGet);
}
}
}
MyServicesRouteMapper.cs
using DotNetNuke.Web.Services;
namespace SDNServices
{
public class MyServicesRouteMapper : IServiceRouteMapper
{
public void RegisterRoutes(IMapRoute mapRouteManager)
{
mapRouteManager.MapRoute("MyServices", "{controller}.ashx/{action}",
new[] { "SDNServices" });
}
}
}
Once created you can invoke the methods like so
http://localhost/DesktopModules/MySer...