This is a migrated thread and some comments may be shown as answers.

DomainDataSource and User Roles Authentication

1 Answer 61 Views
DomainDataSource
This is a migrated thread and some comments may be shown as answers.
Martyn
Top achievements
Rank 1
Martyn asked on 31 May 2011, 02:30 PM
I have a Silverlight Business Application configured to use Membership and Roles.

I have a page within my Silverlight application that can only be accessed by user's belonging to the "Admin" role.

I have a RadDomainDataSource on that page which is attempting to access a query names "GetAllUsersQuery", which within the service definition has an attribute [RequiresRole("Admin")], however, that Domain Data Source is returning a DomainException as it is trying to load before the user has been authenticated and checked to be within the Admin role.

How do I go about fixing this problem?

1 Answer, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 31 May 2011, 03:22 PM
Hello Martyn,

I am not sure what is your exact setup, but most probably you should not use AutoLoad=true and turn it on once you have authenticated the user. If AutoLoad is false, RadDomainDataSource will not try to load unless told to do so by calling its Load method.

On the other hand, how would you go about solving the problem if you were using the stock MS DomainDataSource? If you know the answer to this question, I guess it will be the same with RadDomainDataSource, since the two controls have one and the same internal logic. In other words, this might really be a WCF RIA Services problem/question and not specifically a Telerik control one.

I hope this helps.

All the best,

Ross
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
DomainDataSource
Asked by
Martyn
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or