New Posts New Posts RSS Feed: Admin ASP.NET Membership
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Admin ASP.NET Membership

 Post Reply Post Reply
Author
master-of-disaster View Drop Down
Newbie
Newbie
Avatar

Joined: 12-Feb-2010
Location: Germany
Posts: 11
Post Options Post Options   Quote master-of-disaster Quote  Post ReplyReply Direct Link To This Post Topic: Admin ASP.NET Membership
    Posted: 25-Jun-2010 at 2:33am

I've found a way. I use Globals.cs in my SL-Project to sent dataContext of user to my navigation page.

Regards Dirk
Back to Top
master-of-disaster View Drop Down
Newbie
Newbie
Avatar

Joined: 12-Feb-2010
Location: Germany
Posts: 11
Post Options Post Options   Quote master-of-disaster Quote  Post ReplyReply Direct Link To This Post Posted: 16-Jun-2010 at 12:35pm
Hello,
 
thank you, for your information. It was the information, to create a login.
 
But I've build a standard SL navigation application. Here I've implement DevForce Silverlight to create a login with DevForce Silverlight and ASP.NET Membership and handle my dataoperations.
 
On my main page I use a EntityManager.Principal property. It works fine to return a UserBase information like IsAuthenticed or username for example in my main page. The navigation menu to show a navigation page can be restrickted as expected.
 
But how can I route EntityManager.Principal property  to check user IsInRole() to my navigationpage?
 
Here I will create a Dashboard, here I need to check user roles to enable/disable buttons and other xaml elements for example.
 
When I try to set in main page datacontext => this.ContentFrame.DataContext = user after Login, in my navigation page are no user context is routed.
 
 
Regards
Dirk


Edited by master-of-disaster - 16-Jun-2010 at 1:40pm
Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Posted: 14-Jun-2010 at 7:02pm
Hi Dirk,
 
The current user is available from the Entitymanager.Principal property.  This returns a UserBase from which you can call UserBase.Roles or UserBase.IsInRole().
 
For user administration, I believe you just use the Microsoft ASP.NET Security API and tools.
 
Our documentation for this is in Learning Resources -> Security, and there are three code samples there as well that you can take a look at.
 
Back to Top
master-of-disaster View Drop Down
Newbie
Newbie
Avatar

Joined: 12-Feb-2010
Location: Germany
Posts: 11
Post Options Post Options   Quote master-of-disaster Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jun-2010 at 4:12am
Hello,
 
I have create a Silverlight Navigation Page. Here I implement a ASP.Membership Login with DevForce.
 
Here I've to questions/problems.
 
1. How can I check with DevForce for Silverlight username, role in my HomeViewModel for example.
 
2. I need to create, change/update user account as admin. How can I get all users, roles for users and can update a profile for example??
 
Is there anyone, who can help me? Do someone have samplecode?
 
Regards
Dirk
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down