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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Using WebServices (IWeb would be ok if...)Using WebServices (IWeb would be ok if...)
Previous
 
Next
New Post
7/11/2008 10:07 AM
 

I have a scenario where I want to use webservices to populate data on the client side so I can really speed up the AJAX process.  I don't want to use UpdatePanels because they have too much overhead with the v13wstat3 and stuff (a 29kb+ request/response vs 1-2kb).  I have the webservice working just fine with exception of one thing: security.

Now, I know I could use IWeb for this but I can't seem to find anything in IWeb about accessing the CURRENTLY logged in user in DNN.  Everything in the IWeb project talks about doing it from a separate client altogether, whether another web client or windows client, etc. 

What I'm trying to do is through the ScriptManager -- I've added a reference in there to my webservice so it can autogenerate the JS proxies, then I can easily access them from my javascript code for that page.

So currently I have a SomeService.asmx in my module folder and I access it using the MS ScriptManager.

Anybody have any ideas how I can make the service aware of the currently logged in user, that'd be great.  Using DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo does not work in this context. 

If anybody has a way to make it work with IWeb, I'd gladly switch over.

As a "workaround" I know I can just slap an object into session and then make the webmethod enable session, pull that object back out, and work with it.  That isn't exactly the most secure way of going about this.  That would also render it useless from an external program standpoint but I'm just fine with that because I only *want* it to work from the DNN app.

Thanks in advance.


-- Jon Seeley
DotNetNuke Modules
Custom DotNetNuke and .NET Development
http://www.seeleyware.com
 
New Post
7/11/2008 2:16 PM
 

You don't have to use IWeb, feel free to just grab the specific code that you need.

It apears you want to do what is described here:

http://www.adefwebserver.com/DotNetNukeHELP/Misc/Dotnetnuke_Secure_AJAX_webservices.htm

So yes this example uses IWeb but you pull out the code part you need as I have done in this example:

Silverlight 2.0 Webservice Example

in this example I am getting the "currently loged in user".



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
7/11/2008 2:30 PM
 

Actually here is a JavaScript example that might be easier:

http://dnnsilverlight.adefwebserver.com/Silverlight10/SilverlightXAML/tabid/56/Default.aspx



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
7/11/2008 2:31 PM
 

Also note that both examples use "security" but it has it's limitations. You may want to consider: Implementing "Super Tight Security"



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
7/12/2008 10:13 AM
 

Michael,

As always, your help is absolutely invaluable.  Thank you very much for that sample... I've looked at that code and sample (silverlight) before but it never stuck out to me about the authentication part.  Ingenious way of passing the credentials along in the webservice call and making sure it is dynamic enough that somebody couldn't just fake the call after sniffing the packet. 

Your tutorials and posts are by far some of the most helpful out there and when I was first getting started with module development are what got me going.  Since then I've developed around 18 fully featured modules for internal consumption at my place of employment, two commercial modules, and one free module (and many more in my "planned development" list).

Thanks a ton, you rock!


-- Jon Seeley
DotNetNuke Modules
Custom DotNetNuke and .NET Development
http://www.seeleyware.com
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Using WebServices (IWeb would be ok if...)Using WebServices (IWeb would be ok if...)


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