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


S

Sam

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
 
Ad

Advertisements

S

Sam

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.
 
Ad

Advertisements

Joined
Dec 9, 2010
Messages
1
Reaction score
0
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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top