Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads
 
Add your own
alternative version

Extending ASP.NET role based Security with Custom Security Module (Permission Based, Page Level Authorization)

, 12 Nov 2011 Ms-PL
This project intends to extend the default ASP.NET role based Security to include Permission Based / Page Level Authorization Layer. Works with both ASP.NET and ASP.NET MVC. Permission rules to Allow/Deny access to website resources (like "Folder/File.aspx" or "Controller/Action") are stored in DB.
AadhaarMS.zip
AadhaarMS
Aadhaar.Data
bin
Debug
Aadhaar.Data.dll
Aadhaar.Data.MS.dll
Castle.Core.dll
Castle.DynamicProxy.dll
Castle.DynamicProxy2.dll
Iesi.Collections.dll
log4net.dll
NHibernate.dll
NHibernate.JetDriver.dll
NHibernateProvider.dll
Entity
Components
Mapping
Helper
Properties
Util
ViewModel
Aadhaar.Web
Activities1
Activities2
App_Code
App_Data
AadhaarMS.MDF
AadhaarMS_log.ldf
Bin
Aadhaar.Data.dll
Aadhaar.Data.pdb
Castle.Core.dll
Castle.DynamicProxy.dll
Castle.DynamicProxy2.dll
Iesi.Collections.dll
log4net.dll
NHibernate.dll
NHibernate.JetDriver.dll
NHibernateProvider.dll
Controls
css
Global.asax
images
hdrLogo.jpg
i-bb.gif
i-blc.gif
i-brc.gif
i-l.gif
i-r.gif
i-tb.gif
i-tlc.gif
i-trc.gif
img01.jpg
spacer.gif
install
logs
Superadmin
AadhaarMVC.zip
AadhaarMVC
Aadhaar.Data
bin
Debug
Aadhaar.Data.dll
Aadhaar.Data.MS.dll
Castle.Core.dll
Castle.DynamicProxy.dll
Castle.DynamicProxy2.dll
Iesi.Collections.dll
log4net.dll
NHibernate.dll
NHibernate.JetDriver.dll
NHibernateProvider.dll
Entity
Components
Mapping
Helper
Properties
Util
ViewModel
Aadhaar.MVC
Aadhaar.MVC.csproj.user
App_Data
AadhaarMS.MDF
AadhaarMS_log.ldf
bin
Aadhaar.Data.dll
Aadhaar.Data.pdb
Aadhaar.MVC.dll
Aadhaar.MVC.pdb
Castle.Core.dll
Castle.DynamicProxy.dll
Castle.DynamicProxy2.dll
Iesi.Collections.dll
log4net.dll
NHibernate.dll
NHibernate.JetDriver.dll
NHibernateProvider.dll
Content
images
hdrLogo.jpg
i-bb.gif
i-blc.gif
i-brc.gif
i-l.gif
i-r.gif
i-tb.gif
i-tlc.gif
i-trc.gif
img01.jpg
spacer.gif
Controllers
Global.asax
Models
obj
Debug
Aadhaar.MVC.dll
Aadhaar.MVC.pdb
DesignTimeResolveAssemblyReferences.cache
DesignTimeResolveAssemblyReferencesInput.cache
ResolveAssemblyReference.cache
TempPE
Properties
Scripts
Views
Account
Admin
Error
Home
Shared
Aadhaar.suo
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="install.aspx.cs" Inherits="install_install" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table class="style1">
            <tr>
                <td colspan="2">
                    Hi, The database for the application has not been installed yet. Below is 
                    information regarding installation of Database to Mysql. The sql script for 
                    other databaes is needed to be ported yet.<br />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Literal ID="lblMessage" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td>
                    Step 1 (Check Database Connection ):</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    Server Name</td>
                <td>
                    <asp:TextBox ID="txtDbSrvrName" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
&nbsp;Database Name to Check</td>
                <td>
                    <asp:TextBox ID="txtDbName" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtDbName" ErrorMessage="*Please input database name."></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Database User Id</td>
                <td>
                    <asp:TextBox ID="txtDbUserId" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Database Password</td>
                <td>
                    <asp:TextBox ID="txtDbPass" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Database Type</td>
                <td>
                    <asp:DropDownList ID="drpDbType" runat="server">
                        <asp:ListItem Value="-1">--Select--</asp:ListItem>
                        <asp:ListItem>Mysql</asp:ListItem>
                        <asp:ListItem Value="MSSql">Sql Server</asp:ListItem>
                        <asp:ListItem>Oracle</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    <asp:Button ID="btnCreateDb" runat="server" onclick="btnCreateDb_Click" 
                        Text="Test" />
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    Nhibernate Connection String (From Web.Config):</td>
                <td>
                    <asp:Literal ID="lblConnStrName" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td>
                    Nhibernate Dialect (From Web.Config):</td>
                <td>
                    <asp:Literal ID="lblNHDialect" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    Step 2:</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    Below&nbsp; is the Database script for the specified Database type. Click on the 
                    execute button to run the script.</td>
                <td>
                    <asp:Button ID="btnExecuteScript" runat="server" 
                        onclick="btnExecuteScript_Click" Text="Execute" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Literal ID="lblDbScript" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    &nbsp;</td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)

Share

About the Author

amitthk
Software Developer (Senior)
Singapore Singapore
I love programming, reading, and meditation. I like to explore management and productivity.
Follow on   Twitter

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150331.1 | Last Updated 12 Nov 2011
Article Copyright 2011 by amitthk
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid