Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesWeb servicesWeb services
Previous
 
Next
New Post
6/24/2010 8:04 AM
 

Hi,

I intend developing a module that comprises essentially of a search/search results page and a details page. The search page is simply where the user provides a series of search parameters (i.e. using lists etc.) and where a list of matching items are returned. The details page is simply where the details of a single search result are displayed.

I've had a request for a partner asking whether it would be possible for them to somehow get access to the data outside of the application I'm developing so I was thinking of somehow exposing the various methods I intend developing as part of my project as web services. They could then use these to build their own query tool if they wished?

Sample Web Services:
GetDropDownList1Items
GetDropDownList2Items
GetSearchResults(dropDownList1ID As Integer, dropDownList2ID As Integer, pageSize As Integer, pageNumber as Integer)
GetSearchResultItem(Id As Integer)

Is this kind of functionality possible using DNN? Ideally I'd like to develop a single set of methods that I could use in my app and that my partner could use in theirs.

How is security handled? As part of my project users will have to login to access my search page. How do I control access to my web services to ensure that only my partner can use them? Do they essentially login as a user or is access control total separate from DNN? I've seen reference to the IWeb module which allows you to create Web Services for your DotNetNuke Portal and for developers to use web methods that are integrated with the DotNetNuke security context. Is this kind of module a requirement for the type of thing I'm talking about even if I dont require integration with DNN security context?

Any advice or pointers (to online resources etc.) would be greatly appreciated. I'm new to web services so I'd be interested to hear of specfics things that I'm likley to encounter or that I should do when dealing with them and DNN.

Thanks

 
New Post
6/24/2010 9:32 AM
 
Hi Norman,

You can take a look at the iWeb project: http://iwebcf.codeplex.com/
There you'll find a way to answer many of your questions. Maybe you can just create the methods you need as an extension to iWeb.

Recently, I've developed a 'Single Sign On' (and some related web services) module for DNN, where I've followed a different approach.
I've created REST web services (zero configuration at the server side, no update to the web.config file or anything else is needed) based on http://msdn.microsoft.com/en-us/libra...
Note/warning: The 'WCF REST Starter Kit' seems to be discontinued and replaced by new classes in .NET 4.0. I didn't want to jump th 4.0 at this time so I've utilized the Starter Kit anyway, knowing that in the future (6 months? 1 year?) I'll be removing it and moving the code to .NET 4.0.
Regarding the authentication/security, I've implemented a RequestInterceptor handling all the security (the starter kit includes sample code). It's easy to make the web services of your choice enabled/disabled based on a module's setting. It can also include authorization rules, based on DNN roles. The approach for authorization and authentication was implementing something similar to what Amazon S3 does (why reinvent the wheel if they already created it and it's a good one?): see http://docs.amazonwebservices.com/Ama...
 and http://docs.amazonwebservices.com/Ama...
Instead of using the Access Key ID and Secret Access Key, the security is based on the DNN portal, user and password. Of course, the stronger the passwords, the better. The request headers and hashing process is pretty much the same. There are many .Net sample code for S3.

Thanks,
Horacio.-
 
New Post
6/24/2010 9:32 AM
 
<duplicate removed>
PS: DNN forums developers: prevent double clicks on the 'submit' button. It was slow, no visual clue, so I've clicked it again. Two replies were created.
 
New Post
6/24/2010 10:25 AM
 
Hi Horacio,

Thanks for the reply.

I'll take a look at IWeb but I'm still wondering is IWeb a requirement for consuming/exposing web services within DNN or is it only required if you want advanced stuff like integrating with the DNN security context? Is it possible to develop a Hello World like web service within DNN without a utility like IWeb or is it essentially a requirement to save a lot of otherwise necessary development work? As a start I'd like to create a very simple custom module (which I know how to do) whose single method (in DataProvider and SqlDataProvider) can be called by both my custom module and hopefully by the outside world as a service. I'm just new to web services and introducing something like IWeb straight off if I dont need it adds another layer of complexity to things (but maybe thats just the way it is).

Thanks again.
 
New Post
6/24/2010 10:53 AM
 
Norman Landing wrote:
>is IWeb a requirement for consuming/exposing web services within DNN or is it only required if you want advanced stuff like integrating with the DNN security context?
>Is it possible to develop a Hello World like web service within DNN without a utility like IWeb

Hi,

iWeb is not required at all. You can take a look at is just to get an idea of a possible way to implement web services.

You can develop a hello world web service without any dependence on iWeb or anything else.
BTW, there are currently many approaches for web services, like SOAP and REST. I think the first you should do is decide which path to follow.
Regarding REST (I've chosen this path) you can integrate a simple 'hello world' copying code from here http://code.msdn.microsoft.com/wcfres.... "Lab 1- Hello REST" are just a few lines of code. The web service itself will work (no DNN module needed). You can pack it as a dnn module to make it easy to be installed, later you can add an UI to the module and make the web service read settings from it.

Thanks,
Horacio.-
  

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesWeb servicesWeb services


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out