AzMan Error - Element not found. (Exception from HRESULT: 0x80070490)

Discussion in 'ASP .Net' started by Sam, Dec 11, 2008.

  1. Sam

    Sam Guest

    I am trying to configure AzMan for ASP.NET as described in this
    article:
    http://msdn.microsoft.com/en-us/library/ms998336.aspx

    I simply try to use the method Roles.GetRolesForUser() and an
    exception is thrown. The stacktrace is below. I have done some
    searching for this error, but no real solutions are given. Some
    postings have indicated that a security issue might be the problem,
    but I have assigned Reader rights to the proper login. Has anyone
    seen this error and found a solution?

    [COMException (0x80070490): Element not found. (Exception from
    HRESULT: 0x80070490)]

    [TargetInvocationException: Exception has been thrown by the target of
    an invocation.]
    System.RuntimeType.InvokeDispMethod(String name, BindingFlags
    invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers,
    Int32 culture, String[] namedParameters) +0
    System.RuntimeType.InvokeMember(String name, BindingFlags
    bindingFlags, Binder binder, Object target, Object[] providedArgs,
    ParameterModifier[] modifiers, CultureInfo culture, String[]
    namedParams) +337
    System.Type.InvokeMember(String name, BindingFlags invokeAttr,
    Binder binder, Object target, Object[] args, CultureInfo culture) +36
    System.Web.Security.AuthorizationStoreRoleProvider.CallMethod
    (Object objectToCallOn, String methodName, Object[] args) +183
    System.Web.Security.AuthorizationStoreRoleProvider.InitApp() +1507
    System.Web.Security.AuthorizationStoreRoleProvider.GetClientContext
    (String userName) +16

    System.Web.Security.AuthorizationStoreRoleProvider.GetRolesForUserCore
    (String username) +59
    System.Web.Security.AuthorizationStoreRoleProvider.GetRolesForUser
    (String username) +72
    System.Web.Security.RolePrincipal.GetRoles() +158
    System.Web.Security.Roles.GetRolesForUser(String username) +365
    System.Web.Security.Roles.GetRolesForUser() +14
    ASP.testgroups_aspx.Page_Load(Object sender, EventArgs e)


    Thanks,

    Sam
     
    Sam, Dec 11, 2008
    #1
    1. Advertising

  2. Sam

    Sam Guest

    Re: AzMan Error - Element not found. (Exception from HRESULT:0x80070490)

    On Dec 10, 4:10 pm, Sam <> wrote:
    > I am trying to configure AzMan for ASP.NET as described in this
    > article:http://msdn.microsoft.com/en-us/library/ms998336.aspx
    >
    > I simply try to use the method Roles.GetRolesForUser() and an
    > exception is thrown.  The stacktrace is below.  I have done some
    > searching for this error, but no real solutions are given.  Some
    > postings have indicated that a security issue might be the problem,
    > but I have assigned Reader rights to the proper login.  Has anyone
    > seen this error and found a solution?
    >
    > [COMException (0x80070490): Element not found. (Exception from
    > HRESULT: 0x80070490)]
    >
    > [TargetInvocationException: Exception has been thrown by the target of
    > an invocation.]
    >    System.RuntimeType.InvokeDispMethod(String name, BindingFlags
    > invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers,
    > Int32 culture, String[] namedParameters) +0
    >    System.RuntimeType.InvokeMember(String name, BindingFlags
    > bindingFlags, Binder binder, Object target, Object[] providedArgs,
    > ParameterModifier[] modifiers, CultureInfo culture, String[]
    > namedParams) +337
    >    System.Type.InvokeMember(String name, BindingFlags invokeAttr,
    > Binder binder, Object target, Object[] args, CultureInfo culture) +36
    >    System.Web.Security.AuthorizationStoreRoleProvider.CallMethod
    > (Object objectToCallOn, String methodName, Object[] args) +183
    >    System.Web.Security.AuthorizationStoreRoleProvider.InitApp() +1507
    >    System.Web.Security.AuthorizationStoreRoleProvider.GetClientContext
    > (String userName) +16
    >
    > System.Web.Security.AuthorizationStoreRoleProvider.GetRolesForUserCore
    > (String username) +59
    >    System.Web.Security.AuthorizationStoreRoleProvider.GetRolesForUser
    > (String username) +72
    >    System.Web.Security.RolePrincipal.GetRoles() +158
    >    System.Web.Security.Roles.GetRolesForUser(String username) +365
    >    System.Web.Security.Roles.GetRolesForUser() +14
    >    ASP.testgroups_aspx.Page_Load(Object sender, EventArgs e)
    >
    > Thanks,
    >
    > Sam


    One of the nice features of VS2008 is to step into the .NET framework
    code while debugging. Using this feature I was able to discover that
    a call from the AuthorizationStoreRoleProvider was calling the
    OpenApplication2 method on the AzAuthorizationStoreClass class. One
    of the parameters were the Application name, so it had to be an issue
    with this. Further investigation determined that the Application name
    did not exist in the XML file store I was pointing to.
     
    Sam, Dec 12, 2008
    #2
    1. Advertising

  3. Sam

    squarepants

    Joined:
    Dec 9, 2010
    Messages:
    1
    Fix

    I fixed this issue by making sure that the values in web.config for the connectionStringName and application Name attributes of the add sub-node of the providers node matched what I set up inside of AzMan:

    <providers>
    <add name="RoleManagerAzManProvider"
    type="System.Web.Security.AuthorizationStoreRoleProvider, System.Web, Version=2.0.0.0,
    Culture=neutral, publicKeyToken=b03f5f7f11d50a3a"
    connectionStringName="LocalPolicyStore"
    applicationName="[AZMAN_APP_NAME_HERE]"/>
    </providers>
     
    squarepants, Dec 9, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stan Sainte-Rose

    Exception from HRESULT: 0x800AC352

    Stan Sainte-Rose, May 10, 2004, in forum: ASP .Net
    Replies:
    13
    Views:
    2,015
  2. Lloyd Dupont
    Replies:
    0
    Views:
    4,221
    Lloyd Dupont
    Jan 5, 2007
  3. Michael Herman \(Parallelspace/OpenCanal\)

    AzMan: Has anyone created an HTML/Web management console as an alternative to the AzMan MMC?

    Michael Herman \(Parallelspace/OpenCanal\), Jan 6, 2006, in forum: ASP .Net Security
    Replies:
    0
    Views:
    269
    Michael Herman \(Parallelspace/OpenCanal\)
    Jan 6, 2006
  4. Lars Sundstrom

    Azman. Unable to recive rolls from Azman.

    Lars Sundstrom, Oct 9, 2008, in forum: ASP .Net Security
    Replies:
    0
    Views:
    772
    Lars Sundstrom
    Oct 9, 2008
  5. Ken
    Replies:
    11
    Views:
    1,217
    Joe Kaplan
    Jun 12, 2009
Loading...

Share This Page