ASP.NET 2.0 with ADAM - COMException when accessing roles



Hi,

I've configured an ASP.NET 2.0 application to use
ActiveDirectoryMembershipProvider for the authentication and
AuthorizationStoreRoleProvider for retrieving the role information.

The application succesfully authenticates the users with my Active
Directory server, the problem comes when trying to access the role
information. The server returns us the following exception when
calling the method Roles.GetAllRolles() from our application:

System.Runtime.InteropServices.COMException: This operation can not be
performed on the current domain. (Exception from HRESULT: 0x80070577)

Any help will be appreciated, we need to retrieve the role information
from the active directory. Thanks in advance.

Also, in the server's event viewer there's some additional info which
I'll attach in case it might help.

Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 08/06/2007
Time: 12:13:45
User: N/A
Computer: W2K3DNAVARRO01
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 08/06/2007 12:13:45
Event time (UTC): 08/06/2007 10:13:45
Event ID: 1046127f9798492ca4801d93b40e6f9b
Event sequence: 24
Event occurrence: 2
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/Root/AIDIT-1-128257707778281250
Trust level: Full
Application Virtual Path: /AIDIT
Application Path: C:\Inetpub\wwwroot\AIDIT\
Machine name: W2K3DNAVARRO01

Process information:
Process ID: 3032
Process name: w3wp.exe
Account name: AIDITAD\Administrator

Exception information:
Exception type: TargetInvocationException
Exception message: Exception has been thrown by the target of an
invocation.

Request information:
Request URL: http://localhost/AIDIT/inici.aspx
Request path: /AIDIT/inici.aspx
User host address: 127.0.0.1
User: randolph.carter
Is authenticated: True
Authentication Type: Forms
Thread account name: AIDITAD\Administrator

Thread information:
Thread ID: 1
Thread account name: AIDITAD\Administrator
Is impersonating: False
Stack trace: at System.RuntimeType.InvokeDispMethod(String
name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[]
byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags
bindingFlags, Binder binder, Object target, Object[] providedArgs,
ParameterModifier[] modifiers, CultureInfo culture, String[]
namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args, CultureInfo culture)
at
System.Web.Security.AuthorizationStoreRoleProvider.CallMethod(Object
objectToCallOn, String methodName, Object[] args)
at System.Web.Security.AuthorizationStoreRoleProvider.InitApp()
at System.Web.Security.AuthorizationStoreRoleProvider.GetAllRoles()
at System.Web.Security.Roles.GetAllRoles()
at Inici.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot
\AIDIT\Inici.master.cs:line 22
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,
Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object
sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

.



Relevant Pages

  • Re: check if user belong to a domain against active directory without
    ... your DirectorySearcher and DirectoryEntry objects when you are finished with ... them -- the finallysection of an exception handler is a good place to do ... It also works in ASP.Net with windows authentication ... > public static bool FindUser(string identification, ref string FirstName, ...
    (microsoft.public.dotnet.framework.aspnet)
  • ASP.NET making COM calls on IIS6
    ... with IIS 5 or IIS 6) if the service is installed on the same server as the ... 'Anonymous access and authentication control' ... Exception Details: System.UnauthorizedAccessException: Access is denied. ... granting access rights to the resource to the ASP.NET request identity. ...
    (microsoft.public.inetserver.iis.security)
  • ASP.NET making COM calls on IIS6
    ... with IIS 5 or IIS 6) if the service is installed on the same server as the ... 'Anonymous access and authentication control' ... Exception Details: System.UnauthorizedAccessException: Access is denied. ... granting access rights to the resource to the ASP.NET request identity. ...
    (microsoft.public.inetserver.iis.security)
  • Re: WebDav Authentication
    ... could you please post the complete exception info? ... conversion from string to double where indicated below. ... Dim strBody as String ... 'Get the response & store the authentication cookies: ...
    (microsoft.public.exchange2000.development)
  • Forms Authentication and long ViewState Problem
    ... Exception Details: System.Web.HttpException: Unable to validate data. ... [HttpException: Authentication of viewstate failed. ...
    (microsoft.public.dotnet.framework.aspnet)