Dotnetnuke Services Framework and AjaxWebLinks

The good people at Dotnetnuke have release a new ctp which allows module developers to add external api to their modules. You can view the announcement made by Bob Kruger here and a short tutorial from Scott Schlesier here.

I created a branch of my AjaxWebLinks sample module based on asmx webservices and converted it to use the new framework. I think there are some things that can be improved but my overall experience has been good so far. I like the fact that the services work without any sort of registration. When the Dotnetnuke application starts it searches for all classes which implement the special routing interface and registers the routes to the services.

One thing that wasn’t mentioned in the tutorial (or I somehow missed it) is your request requires a “TabId” and a “ModuleId” header to check permissions successfully.

Here is a sample Ajax request from my converted module:

        type: "POST",
        beforeSend: function (xhr) {
            xhr.setRequestHeader("ModuleId", AjaxWebLinksModuleID);
            xhr.setRequestHeader("TabId", AjaxWebLinksTabID);
        url: "/DesktopModules/AjaxWebLinks/API/Handler/GetLinks",
        data: {},
        dataType: "json",
        success: function (data) {

        error: function () {

Download the sample module and source here


Jquery AjaxWeblinks Module for Dotnetnuke released

After a very long time I was able to finish the first version of the AjaxWeblinks module which demonstrates a method for using jQuery/Ajax functionality in a Dotnetnuke module. For now, there can only be one instance of the module on any given page. I will release another version soon which will have better scoped and enqueued javascript.

The packages are available here.

Dotnetnuke Ajax WebLinks module on Codeplex

I promised to release the complete code for the Dotnetnuke Ajax WebLinks module I have been working on. It was supposed to demonstrate a method for including jquery ajax functionality in dotnetnuke modules. However, I have not had time to finish it and write up the last two posts. In the mean time I posted the project on codeplex so people can view all the nearly complete source code. When I get some time soon I will finish this one and possibly create a version for Dotnetnuke 6.x if there isn’t already something built in that makes it unnecessary.

It can be found here