.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Role Manager not working

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :ASP.Net


Im using Visual Web Developer 2010, the roles work ok when run locally but when published they dont seem to work at all.

Can someone please point out what I need to change, everything else works ok. I can log in and add records.

Here is the config.

<?xml version="1.0"?>
  For more information on how to configure your ASP.NET application, please visit

<add key="ChartImageHandler" value="storage=file;timeout=20;" />

        <add name="ApplicationServices" connectionString="Data Source=xxxx;Initial Catalog= ASPNETdb;Persist Security Info=True;User=ASPNETdb;Password=xxxx;" providerName="System.Data.SqlClient"/>
        <add name="PODPortalConnectionString" connectionString="Data Source=xxxx;Initial Catalog= ASPNETdb;Persist Security Info=True;User=ASPNETdb;Password=xxxx;" providerName="System.Data.SqlClient"/>
        <add name="ASPNETDBConnectionS

View Complete Post

More Related Resource Links

Authorize It: Use Role-Based Security in Your Middle Tier .NET Apps with Authorization Manager


Authorization Manager in Windows Server 2003 represents a significant improvement in the administration of role-based security, making it more scalable, flexible, and easier to implement. Using Authorization Manager, you can define roles and the tasks those roles can perform. You can nest roles to inherit characteristics from other roles, and you can define application groups. In addition, Authorization Manager lets you use scripts to modify permissions dynamically, and it allows you to wrap your security logic in a security policy that can be stored in Active Directory. Authorization Manager also includes an easy-to-use API for running access checks. The author discusses all of these topics and demonstrates them with a working sample.

Keith Brown

MSDN Magazine November 2003

Large amount of handles of type token using role manager and authorisation manager (azman)

First you'll need some background on the application.  ASP.net application using .net framework 3.5. Security to the application is controlled with impersonation, using a role manager connecting to an azman store which uses Active Directory groups for security. As demoed in the following msdn link ... http://msdn.microsoft.com/en-us/library/ff649313.aspxAfter 50 or so users access the application throughout the day, eventually the application stops responding or users start to experience images not displaying etc and the application pool has to be recycled (typical symptoms of the server running out of memory).  Looking at the application memory usage and available memory on the server this does not appear to be the issue, investigations so far have lead me to think this is to do with Security Token Handles.  I've used process explorer to monitor the asp.net application and handles for the application steadily increase with every page that is accessed and eventually hit 38,000 this is when the application dies.  I've read various links saying that applications should use between 2,000-10,000 handles and any number near 40,000 makes the application unusable (this is the exact behaviour we are experiencing).  Using process explorer and handle.exe from the windows sysinternals site I

custom role manager, type error in Web.config

Hello everybody.I am developping a role provider for AD.I have copy in the root directory of my project in VS2010 the file MyAdamRoleProvider.vb which is an example of a book.I have declared in my web.config the role provider like this: <connectionStrings> <add name="ADService" connectionString="LDAP://webcubedev/OU=webcube,DC=wcdev,DC=local"/> <add name="ADServiceRole" connectionString="LDAP://webcubedev/OU=webcube,DC=wcdev,DC=local"/> </connectionStrings> <system.web> <roleManager enabled="true" defaultProvider="ActiveDirRP"> <providers> <add name="AspNetActiveDirectoryMembershipProvider" type="MyAdamRoleProvider" connectionStringName="ADService" connectionStringRoleName="ADServiceRole" /> </providers> </roleManager> When I debug, the error is "Impossible de charger le type 'MyAdamRoleProvider'"In english : "can't load 'MyAdamRoleProvider' type"I don't see what is wrong, can you help me?

Menu - Role security not working on second level of sitemap


I have role assignments on both the first and second level of my menus within my sitemap file.  The first level works fine, and I only see items assigned to my role.

But roles assignments seem to have no effect on the second level.  It seems like if you have access to the first level, you have access to everything on the second level.

Is this correct?

From my sitemap (either a SalesRep or an Administrator can see everything underneath):

    <siteMapNode title="Administration" roles="SalesRep,Administrator" description="Admin" >

      <siteMapNode title="CompanyMaintenance" roles="SalesRep" url="~/Admin/CompanyManagement.aspx" />

      <siteMapNode title="Initialize Roles" roles="Administrator" url="~/Admin/Roles.aspx"/>


From my config:

    <roleManager enabled="true" defaultProvider="SqlRoleProvider">

Authorization Manager (AzMan) as role provider with Windows integrated authentication in SharePoint


Hi all,

First I will describe my environment: Windows Server 2008 R2 x64, IIS 7, SQL Server 2008 and MOSS 2007 Enterprise Edition SP2 x64.

I am trying to setup SharePoint 2007 portal to use Windows integrated authentication with Authorization Manager (AzMan) as role provider.

I have set up an authorization store and defined a set of roles in there. Further I configured the web.configs of my SharePoint environment to use AzMan as role provider.

In IIS I see the roles appearing, but unfortunately those roles are not available in my SharePoint portal. I also see notification in IIS stating that Forms authentication has to be used

What should I do to configure it correctly? Is it even possible to use AzMan with Windows authentication in SharePoint 2007?

Thanks in advance.

With kind regards,




Role manager GetRolesByUserName()


 hi everyone


i have implemented  .net security ( by ASP.NET Web Site Administration Tool)

now i have to  know  the logged in   user name and  role  .

for user name



thts  working  :)


but what to  do to  find out the current user  role ???



please reply  fast


SQL Server 2008 Report Manager is not fully working



On Windows server 2008 R2 Enterprise Edition, we have installed SQL server 2008 R2 Reporting services and SQL Server 2008 database with Reporting services.  Both have different instances.

Now, we can work with Report manager of SQL server 2008 R2 without any issue. i.e. assignment of new user role etc. is working fine, but when we try to do same thing with report manager of sql server 2008 then its not working. No error message is being shown by the report manager when we try to assign new user a role and press OK button it doesn't show any message.


What could be the problem?





Report Manager URL http:///Reports is not working in SharePoint Integrated Mode


Hello Friends,

I am ali, I am so confused why the Report manager URL(http://<servername>/Reports is not working in sharpoint integrated mode. 

In my local system

1. at the time of SQL Server 2008 R2 installation Reporting services enabled In Native mode.
2  In Reporting service config manager tool http://<serverName>/Reports URL is working in Native mode. Here i am able to create New Roles.
3. In Reporting service config tool When i create a new database in sharepoint integrated mode, the the Report Manager URL http://<ServerName>/Reports not working, gettig this error "This operation is not supported on a report server that is configured to run in SharePoint integrated mode. (rsOperationNotSupportedSharePointMode)"
4 . From both databases(In native mode and sharepointmode) the the webservice URL http://<servername>/ReportServer working fine.

Reporting Services Config manager :

SSRS working fine in Report builder and manager but not in Report viewer


HI I have a report that worked fine until we upgraded the SQL server from 2008 to 2008 R2 and the report viewer to latest version as well.
This report has a pie display, NOW instead of showing one pie, it is showing 20 pies!

I am trrying to learn how to resolve and what is causing this. 

Adding user to SSAS server role not working


I have SQL Server 2005 SP3 installed on  Windows 7


 I’m trying to deploy a SSAS project and get the message


“Either the user, Ron-laptop\ron, does not have access to the analysis services Project2 database, or the database does not exist”


Following recommendations in the forum I’ve used SSMS to view the properties > security of the SSAS connection and am trying to add myself to “The server role is used to grant server-wide security privileges to a user” role


Working with SharePoint document libraries

Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments. Users with Microsoft Office 2003 can check out and edit the files as if they resided on a local or network drive.

By default, your team Web site comes with a built-in document library named Shared Documents, which is listed on the Quick Launch bar as well as on the Documents and Lists page.

Working with DropDownList and ListBox Controls in ASP.NET

"In my application i am using dropdownlist to display all categories from a table. When the user clicks this control I display all records in that category. Category table also contains column called color.

I wanted display some categories in dropdown list different color and others in different color using ASP.NET."-Anonymous

Server side validation of Fileupload control not working



I've tried this method in my code behind to try and validate that the Fileupload control has a file or not. I get the error message the the event "Server Validate" cannot be found. Can anyone tell why? Thanks.

Public Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate

' Get file name

        Dim uploadAvatar As FileUpload = DirectCast(AdvertisementForm.FindControl("uploadAvatar"), FileUpload)

        Dim UploadFileName As String = uploadAvatar.PostedFile.FileName

        If UploadFileName = "" Then
            ' There is no file selected
            args.IsValid = False
            Dim Extension As String = UploadFileName.Substring(UploadFileName.L

Row command working on all rows not selected one?



I have this code that hides a column in a gridview.  (The column houses another nested gridview).

    Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
        If e.CommandName = "Select" Then
            If GridView1.Columns(0).Visible = False Then
                GridView1.Columns(0).Visible = True
                GridView1.Columns(0).Visible = False
            End If
        End If
    End Sub

The trouble is that if I click the select link on one row that action to hide is carried out on all rows.  How can I set this up so that it only hides the row that is selected?


Problem making Role based Menu in MVC application



 I want to make Rolebase menu in MVC such that if user doesnot have permission for some action then that Action name shouldnot be shown in the Menu.

 I have used the code in the url(http://forums.asp.net/t/1566328.aspx) in my MVC application.My application is a Discussion Forum(in MVC) same functionality as in this forum forums.asp.net

 I have used Controllers for post, thread etc.In each controller there are some actions that are using [Authorize(Roles)] attribute

 but this coding does not count  those Actions in Controllers having Authorize attribute according to the url http://forums.asp.net/t/1566328.aspx 

 In the code, Authorize attribute is applied to Controller class, but my requirement is of Applying Authorize attribute to some actions in controller so that some are available for all users and  some links are available rolewise.Now what is the solution for that?



upload file not working



iam using masterpage and ajax update panel, i have child page called  fileupload.aspx,i try to upload the file

but its not working , can i use updatepanel in child page , pls very urgent

looking forward for answer.

JQuery Treeview plugin is not working with Ajax page load in ie8


Hi there,

I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.

Any idea?

Thanks in advance.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend