0

There is the UserController class that lets us access and save user data.

I think UserController was meant to be used from within the context of a DNN website application, since it somehow already knows the connection string and other DNN settings.

So I take it that DNN Controller classes can't be used outside the context of a DNN website application, thus I can't add/revoke roles, reset password, and other administrative actions from a desktop application, correct?

If it's possible, please let me know. Thank you.

Mickael Caruso
  • 8,721
  • 11
  • 40
  • 72
  • 1
    Anything is possible, I would look at writing your own WEBAPI methods to do this from an app – Chris Hammond Feb 24 '14 at 19:10
  • I was afraid you'd say that (Web Api). I was hoping for a desktop version of DotNetNuke.Entities where I get to pass in the connection string into constructors. I'll look into how DNN does Web Api, then. – Mickael Caruso Feb 24 '14 at 19:17

2 Answers2

1

That's not possible out of the box but some reference can be available here which does somewhat similar things: http://iweb.codeplex.com/

Prashant Lakhlani
  • 5,758
  • 5
  • 25
  • 39
0

Most of what you are asking for are pretty simple DB operation. You could use Entity Framework to map tables into classes in your .Net App and then issue Update commands. However, these will be executed outside of DNN and may not impact a currently logged on user unless you clear the cache of DNN or restart app.

You could write custom WebAPI methods to do so as Hammond suggested above. You need to ensure that these methods are secure though and only Admin / Host can execute them.

Ash Prasad
  • 171
  • 7
  • I have done some "DNN Rigging" this way (though I have used Linq-Sql instead of EF). I was able to grant and revoke roles, and so far, there seems to be no problem. The thing is, there are DNN-specific columns I don't know what they're for, and I guessed some values - probably not a good thing and a "DNN violation." – Mickael Caruso Feb 27 '14 at 15:21