Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm converting a vb.net 2005 desktop application to being web based. The user would log into a server using remote desktop connection.
Anyone who could log into the server could start the GUI, but when a user wanted to do more than read information the GUI called a stored procedure called GetPermissions to see if they were allowed to do what they wanted. The procedure was something like this.

select is_member('part1') as part1,
is_member('part2') as part2,
is_member('part3') as part3,
is_member('part4') as part4,...

some users have permission to execute part1, others part 3 others have permission to execute all parts.

How best to replicate this set up in a web based GUI (asp.net 3.5 with vb)?
One big difference is that the link should only work for people who have permission to use at least one of the four parts mentioned above.
If I use a login control I'm worried I would have to somehow manually synchronise the ASP.net roles with the db roles.
Posted

Nothing changes. Because your ASP.net application will have server side code, nothing really changes. What by way of authentication and knowing what the user is does your current application know what user has which role?? Surly this can easily be ported to something like the asp.net membership and roles provider?

Developing custom ASP.NET Membership and Role providers reading users from custom section in the web.config[^]

If you were going the way of a JS heavy UI then your server side / business layer should be accessible via a service call. This can then be queried to identify if certain users have rights.
 
Share this answer
 
The role information is in db roles. How do I port this over to something like the asp.net membership and roles provider?
At the moment I've asked the dba to create a table on a daily basis with this information.
This is because only the ID db_owner would be able to retrieve all the necessary information.
 
Share this answer
 
Comments
db7uk 29-Apr-13 15:10pm    
Ok, first, if you have a reply I would recommend either replying to my original solution or by "Improve Question" link. Now, the ASP.NET membership and roles provider are all very extendible. The roles provider shown in my solution shows how this can be done. The only thing you need to worry about is modifying the aspnet_roles stored procedures to to the work. A dba should be able to handle this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900