Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > AzMan Error - Element not found. (Exception from HRESULT: 0x80070490)

Reply
Thread Tools

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

 
 
Sam
Guest
Posts: n/a
 
      12-11-2008
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
 
Reply With Quote
 
 
 
 
Sam
Guest
Posts: n/a
 
      12-12-2008
On Dec 10, 4:10*pm, Sam <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
 
squarepants squarepants is offline
Junior Member
Join Date: Dec 2010
Posts: 1
 
      12-09-2010
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.AuthorizationStoreRolePr ovider, System.Web, Version=2.0.0.0,
Culture=neutral, publicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalPolicyStore"
applicationName="[AZMAN_APP_NAME_HERE]"/>
</providers>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Azman. Unable to recive rolls from Azman. Lars Sundstrom ASP .Net Security 0 10-09-2008 09:01 AM
AzMan - Class not registered COMException babysealsarecute ASP .Net 0 03-12-2008 08:21 AM
how to Update/insert an xml element's text----> (<element>text</element>) HANM XML 2 01-29-2008 03:31 PM
ADAM/AzMan Does Not Create Roles/Tasks mkc ASP .Net Security 0 10-19-2006 08:21 PM
AzMan: Has anyone created an HTML/Web management console as an alternative to the AzMan MMC? Michael Herman \(Parallelspace/OpenCanal\) ASP .Net Security 0 01-06-2006 01:24 AM



Advertisments