views:

184

answers:

1

I want to use jQuery's ajax functionality in a DotNetNuke module I'm developing.

I want the ajax call to be authenticated via DNN's membership functionality.

I want the ajax response as json.

How can I do this?

I've looked at IWeb and IWebCF -- it's not clear to me from much Googleing and scanning the forums whether these modules would allow me to create a web service that would accept a simple post request and return json (seems like they want to do it the ASP.NET AJAX way with a generated proxy, I'd prefer to just use jQuery's AJAX call functionality).

Seems you can't create a simple webmethod in a DNN module (since they are developed as User Controls (.ascx)).

I could deploy an .asmx file with module, but that won't leverage DNN's authentication system.

Ideas?

I'm currently developing against DNN 4.9.5

A: 

We just did this, but we ended up having to copy a bunch of code from the MembershipModule class to set the current user from their cookies (since that module exits out when the path doesn't end with a known file extensions).

If you're able to get a web service working via IWeb/IWebCF, you should be able to call that without the proxy (though it might still automatically generate the proxy), the same way that you would call any other ASP.NET Web Service.

bdukes