Formular una preguntaFormular una pregunta
 

Respuesta propuestaAn Operations Error Occured

  • jueves, 17 de enero de 2008 13:44Virtual Andy Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     

    Hi,

     

    I am having problems adding groups to my applications via the 'Access Permissions' tab. When I click 'Add...' I get an message dialog stating 'An operations error occured.'.

     

    When I click OK the 'Add/Edit User Group' dialog appears but I am unable to access the domain groups. The following is from the sftmmc.log file

     

    ManagementConsole.MCException: An operations error occurred.
     ---> System.Runtime.InteropServices.COMException (0x80072020): An operations error occurred.


    Server stack trace:
       at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
       at System.DirectoryServices.DirectoryEntry.Bind()
       at System.DirectoryServices.DirectoryEntry.get_AdsObject()
       at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
       at System.DirectoryServices.DirectorySearcher.FindAll()
       at SoftGrid.Management.DataAccess.AdAccountQueries.SearchDirectory(AccountObjectData parent, String filter, SearchScope scope)
       at SoftGrid.Management.DataAccess.AdAccountQueries.GetGroups(AccountObjectData parent, AccountObjectData[]& subContainers, AccountObjectData[]& groups)
       at SoftGrid.Management.DataAccess.AccountQueries.GetGroups(AccountObjectData parent, AccountObjectData[]& subContainers, AccountObjectData[]& groups)
       at SoftGrid.Management.Accounts.GetGroups(AccountContainer parent, AccountContainer[]& subContainers, AccountGroup[]& groups)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at SoftGrid.Management.IAccounts.GetGroups(AccountContainer parent, AccountContainer[]& subContainers, AccountGroup[]& groups)
       at ManagementConsole.ManagementSession.GetGroups(AccountContainer parent, AccountContainer[]& subContainers, AccountGroup[]& groups)
       --- End of inner exception stack trace ---


     

    has anyone seen this before, as I am now no longer able to perssion applications.

     

    Thanks,

     

    Andy

Todas las respuestas

  • viernes, 18 de enero de 2008 21:44PerG Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     

     

    I have seen this error on websites that has impersonation set to true in the web.config file with NTLM or Kerberos authentication set. (due to the fact that the users token is a "secondary token" that cannot be used when authenticating against another server)

     

    You could either use Basic Authentication or switch the impersonation setting to false in web.config (which might break the app)

     

    I have a small blogentry about the error when seen in sharepoint, but I guess that you're not going to change the code.. Wink

    http://sharepoint-tweaking.blogspot.com/2007/12/impersonation-in-aspnet-causes.html

  • martes, 22 de enero de 2008 18:11Michelle Foley _MSFT_ Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     

     

    I found one of the error codes 0x80072020 may point to a problem contacting/communicating with the AD. Anything out of the ordinary in the Event logs or the SFT logs?

     

     

  • martes, 19 de agosto de 2008 15:12Daniel Siegl Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     

     

    Switching to Basic Authentication did the Trick but it is not a very good solution. As automatic login will not work anymore.

    I'm generating a Self Service Application where users can Alter some of their AD Properties.

     

    So this is really very annoying.

     

    BR
    Daniel

  • martes, 07 de octubre de 2008 19:32THaynes Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    Hi Daniel,

    I'm having the exact same problem.  Did you find a solution that did not require Basic Authentication?

    Thanks for any help!
    Tim
  • viernes, 14 de noviembre de 2008 15:31Maharjan Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     Respuesta propuesta
     PerG wrote:

     

    I have seen this error on websites that has impersonation set to true in the web.config file with NTLM or Kerberos authentication set. (due to the fact that the users token is a "secondary token" that cannot be used when authenticating against another server)

     

    You could either use Basic Authentication or switch the impersonation setting to false in web.config (which might break the app)

     

    I have a small blogentry about the error when seen in sharepoint, but I guess that you're not going to change the code..

    http://sharepoint-tweaking.blogspot.com/2007/12/impersonation-in-aspnet-causes.html

     

    I was using Windows Authentication for hosting my intranet site. In my web.config file is was   

    <authentication mode="Windows"/>
      <identity impersonate="true"/>

     

    But still it was not working and error was showing on  dirSearch.FindOne(); since I was using Directory search in Active Directory for user authentication.  Your code below works properly to send user credential in SQL Server and now I am able to use User_Name keyword in sql server. It gets the user name what we authenticate from domain users.

    using System.Web.Hosting;
    ...
    ...

    // Code here runs as the logged on user

    using (HostingEnvironment.Impersonate()) {
    // This code runs as the application pool user
         DirectorySearcher searcher ...
    }

    Thank you very much!.

  • jueves, 08 de enero de 2009 12:31Syed Azharuddin Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     

    Thanks a million yar, you saved me, I was really worried about the issue..

    using(HostingEnvironment.Impersonate())
    {

        code ..... blah blah blah...

    }

    solved my problem...

  • lunes, 08 de junio de 2009 18:34JJ_Berg Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    You're a genius! Thanks so much!
  • viernes, 11 de diciembre de 2009 10:24Vijander Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    Thanks man, you saved my whole day or might me more :)


    It was bang on the target.
  • jueves, 07 de enero de 2010 6:15ravi_developer Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    Hi vijander,

    i have same problem in the with my vb.net code.
    here is my code..

    Protected

     

    Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


    Dim

     

    m_LoginName As String = Environment.UserName.ToString
    Dim dirEntry As System.DirectoryServices.DirectoryEntry
    Dim dirSearcher As System.DirectoryServices.DirectorySearcher
    dirEntry = New System.DirectoryServices.DirectoryEntry(LDAP://abc.com)
    dirSearcher =
    New System.DirectoryServices.DirectorySearcher(dirEntry)
    dirSearcher.Filter =
    "(samAccountName=" & m_LoginName & ")"
    Dim sr As SearchResult = dirSearcher.FindOne()
    Dim de As System.DirectoryServices.DirectoryEntry = sr.GetDirectoryEntry()
    Dim sUserName As String = de.Properties("GivenName").Value.ToString()
    Dim sLName As String = de.Properties("Sn").Value.ToString() 
    Lgname1.Text =
    "Welcome : " & sUserName & " " & sLName

     

    End Sub

     

     



    lines in my web.config file are..
    <authentication mode="Windows"/>
      <identity impersonate="true"/>

    Could you please hlep me how do i overcome the issues.. using... (HostingEnvironment.Impersonate())

    do i need to add this in my code page.. please help me here ...

    -Ravi.



  • jueves, 07 de enero de 2010 8:12Vijander Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    Add the code you've written in the
    using(HostingEnvironment.Impersonate()) block like:



    using(HostingEnvironment.Impersonate())
    {

    m_LoginName
    As String = Environment.UserName.ToString
    Dim dirEntry As
    System.DirectoryServices.DirectoryEntry
    Dim dirSearcher As
    System.DirectoryServices.DirectorySearcher
    dirEntry = New System.DirectoryServices.DirectoryEntry(LDAP://abc.com
    )
    dirSearcher =
    New
    System.DirectoryServices.DirectorySearcher(dirEntry)
    dirSearcher.Filter =
    "(samAccountName=" & m_LoginName &
    ")"
    Dim sr As
    SearchResult = dirSearcher.FindOne()
    Dim de As
    System.DirectoryServices.DirectoryEntry = sr.GetDirectoryEntry()
    Dim sUserName As String = de.Properties("GivenName"
    ).Value.ToString()
    Dim sLName As String = de.Properties("Sn"
    ).Value.ToString() 
    Lgname1.Text =
    "Welcome : " & sUserName & " "
    & sLName
    }

    Hope it works!!

  • domingo, 07 de febrero de 2010 13:59RMRodrigues Medallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuarioMedallas del usuario
     
    My friend, it works very well!! Thank you so much!