I want to know about custom role provider. First I will state my requirement. My web application needs authentication and authorisation. The authentication is maintained by a different system(creating/deleting users) etc. So I will use one web service to
authenticate users into my application. Based one authentciation credential, i want to restrict access to my app. I heard like there is a way to implement custom role provider like http://msdn.microsoft.com/en-us/library/ms998314.aspx#paght000013_step3 and
finally I want to achieve Sitemap trimming http://msdn.microsoft.com/en-us/library/ms178428%28v=vs.80%29.aspx. is it possible to implement a role provider without membership provider and my idea is doable or not? Any kind of help will be greatly appreciated.
Thanks Dave..What I have done is inside my login control's Authenticate event handler I have the following code
// Get user name and perform authentication and if a valid user user
FormsAuthentication.RedirectFromLoginPage(userName, false);
This call will trigger my custom role provider's GetRolesForUser(string username) implementation
sajanemmanue...
Member
12 Points
21 Posts
Implementing custom role provider without membership provider
Feb 09, 2012 11:45 AM|LINK
Hello All,
I want to know about custom role provider. First I will state my requirement. My web application needs authentication and authorisation. The authentication is maintained by a different system(creating/deleting users) etc. So I will use one web service to authenticate users into my application. Based one authentciation credential, i want to restrict access to my app. I heard like there is a way to implement custom role provider like http://msdn.microsoft.com/en-us/library/ms998314.aspx#paght000013_step3 and finally I want to achieve Sitemap trimming http://msdn.microsoft.com/en-us/library/ms178428%28v=vs.80%29.aspx. is it possible to implement a role provider without membership provider and my idea is doable or not? Any kind of help will be greatly appreciated.
Frank Jiang ...
All-Star
16006 Points
1728 Posts
Microsoft
Re: Implementing custom role provider without membership provider
Feb 13, 2012 03:27 AM|LINK
Sample Role-Provider Implementation:
http://msdn.microsoft.com/en-us/library/tksy7hd7(v=vs.90).aspx
http://msdn.microsoft.com/en-us/library/317sza4k(v=vs.90).aspx
Hope it can help you.
Thanks,
Feedback to us
Develop and promote your apps in Windows Store
sajanemmanue...
Member
12 Points
21 Posts
Re: Implementing custom role provider without membership provider
Feb 13, 2012 04:54 AM|LINK
Hello,
Can you please look into my question again. My doubt is can role provider work without membership provider?
Dave Sussman
All-Star
37716 Points
5005 Posts
ASPInsiders
MVP
Re: Implementing custom role provider without membership provider
Feb 13, 2012 08:25 AM|LINK
Yes, the role provider can work without the membership provider.
If you're looking to write a role provider, use the existing role provider code for a starting point or learning exercise. Get it from download.microsoft.com/download/a/b/3/ab3c284b-dc9a-473d-b7e3-33bacfcc8e98/ProviderToolkitSamples.msi.
vinay13mar
Star
7756 Points
1626 Posts
Re: Implementing custom role provider without membership provider
Feb 13, 2012 08:27 AM|LINK
check the url
http://www.codeproject.com/Articles/22503/Custom-Membership-Role-Providers-Website-administr
V.K.Singh
sajanemmanue...
Member
12 Points
21 Posts
Re: Implementing custom role provider without membership provider
Feb 15, 2012 01:07 PM|LINK
Thanks Dave..What I have done is inside my login control's Authenticate event handler I have the following code