Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 7th, 2006, 06:24 AM
Authorized User
 
Join Date: Jan 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Authorization

Hi,
well im working on an application which uses windows authentication....
 the problem is that the user roles and permissions are stored in a SQL database .... I have retrieved the role and permission but im not sure if it is the way it is supposed to be done.... please could u check my code and tell me what is wrong ..... and what i should do to correct it...
 the code is as follows:i am calling the method getUserRoles() from the global.asax.cs.....is there a better way to do it .....please help......
namespace Aztec.Track.IdentityManager
{
    public class Login
    {
        public Login()
        {

        }
        public void getUserRoles()
        {
            string[] UserName;
            ArrayList UserRoles=new ArrayList();
            ArrayList UserPermissions=new ArrayList();
            WindowsIdentity UserIdentity =WindowsIdentity.GetCurrent();
UserName=UserIdentity.Name.Split('\\');
ProjectDetails projectdetails=new ProjectDetails();
UserRoles=projectdetails.getUserRole(UserName[1]);

for(int i=0;i<UserRoles.Count;i++)
{
UserPermissions.Add(projectdetails.getPermissions( UserRoles[i].ToString()));
    }
}}

achhetri
__________________
achhetri





Similar Threads
Thread Thread Starter Forum Replies Last Post
authorization denied COM+ pevl Pro VB Databases 2 July 8th, 2006 09:02 PM
Regarding authorization harshaghanta ASP.NET 2.0 Professional 1 June 5th, 2006 09:18 PM
SMTP Authorization zarol PHP How-To 0 April 5th, 2006 02:56 AM
Authorization of download eapsokha Classic ASP Professional 3 February 23rd, 2004 12:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.