Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET VB.NET
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 29-Apr-13 4:12am
Alhal218
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Comments
db7uk at 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)

  Print Answers RSS
0 OriginalGriff 329
1 Maciej Los 290
2 Sergey Alexandrovich Kryukov 230
3 Shweta N Mishra 185
4 PIEBALDconsult 149
0 OriginalGriff 7,660
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,760


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 29 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100