Loading ...
Sorry, an error occurred while loading the content.

Need help in Active Directory Synchronization (DIR-SYNC) in .Net 2.0

Expand Messages
  • Vinod J Nair
    Hi, I am using AD DirSync in .Net2.0 using cookies and trying to retrieve all user from a particular domain. I am getting the following errors: 1. When I run
    Message 1 of 10 , Jun 10, 2007
    • 0 Attachment
      Hi,

      I am using AD DirSync in .Net2.0 using cookies and trying to retrieve
      all user from a particular domain. I am getting the following errors:

      1. When I run this code against a domain having less number of users,
      it works fine except that it throws a message in my code saying
      Context Switch Deadlock was detected. If I click continue the code
      works fine and gives me the expected results. Here is the detailed
      error:

      "The CLR has been unable to transition from COM context 0x1a0f98 to
      COM context 0x1a1108 for 60 seconds. The thread that owns the
      destination context/apartment is most likely either doing a non
      pumping wait or processing a very long running operation without
      pumping Windows messages. This situation generally has a negative
      performance impact and may even lead to the application becoming non
      responsive or memory usage accumulating continually over time. To
      avoid this problem, all single threaded apartment (STA) threads
      should use pumping wait primitives (such as CoWaitForMultipleHandles)
      and routinely pump messages during long running operations."

      2. When I am running the same code for a domaing having more than 1
      lac records, it shows me the same error as described above and after
      sometime it gives me "Out of memory" exception.

      Please suggest how to fix both these issues. Thanks in advance.

      Thanks & Regards,
      Vinod
    • amal ali mohamed
      Dear Sir, I know what is the cause of your problems from my viewpoint: 1. Deadlock program can be happened when one user lock a resource and need to another
      Message 2 of 10 , Jun 12, 2007
      • 0 Attachment
        Dear Sir,

        I know what is the cause of your problems from my viewpoint:

        1. Deadlock program can be happened when one user lock a resource and need to another resource that is locked by another user. You must use a deadlock prevention technique.

        2. Out of memory exception happened when you save more and more information. You can optimize your saving in the memory to save as few as possible in the memory. I don't if you can use
        optimization technique or no. but you can search about this.

        I know that my experience is low but that is all from my knowledge

        AMAL ALI
        ITI trainee

        Vinod J Nair <vinodjnair@...> wrote: Hi,

        I am using AD DirSync in .Net2.0 using cookies and trying to retrieve
        all user from a particular domain. I am getting the following errors:

        1. When I run this code against a domain having less number of users,
        it works fine except that it throws a message in my code saying
        Context Switch Deadlock was detected. If I click continue the code
        works fine and gives me the expected results. Here is the detailed
        error:

        "The CLR has been unable to transition from COM context 0x1a0f98 to
        COM context 0x1a1108 for 60 seconds. The thread that owns the
        destination context/apartment is most likely either doing a non
        pumping wait or processing a very long running operation without
        pumping Windows messages. This situation generally has a negative
        performance impact and may even lead to the application becoming non
        responsive or memory usage accumulating continually over time. To
        avoid this problem, all single threaded apartment (STA) threads
        should use pumping wait primitives (such as CoWaitForMultipleHandles)
        and routinely pump messages during long running operations."

        2. When I am running the same code for a domaing having more than 1
        lac records, it shows me the same error as described above and after
        sometime it gives me "Out of memory" exception.

        Please suggest how to fix both these issues. Thanks in advance.

        Thanks & Regards,
        Vinod






        ---------------------------------
        Got a little couch potato?
        Check out fun summer activities for kids.

        [Non-text portions of this message have been removed]
      • vinod vjn
        Thanks Amal for your suggestion & help. But i am looking for more input in technical terms to fix these issues. ... [Non-text portions of this message have
        Message 3 of 10 , Jun 12, 2007
        • 0 Attachment
          Thanks Amal for your suggestion & help. But i am looking for more input in
          technical terms to fix these issues.

          On 6/12/07, amal ali mohamed <amal_ali_mohamed@...> wrote:
          >
          >
          > Dear Sir,
          >
          > I know what is the cause of your problems from my viewpoint:
          >
          > 1. Deadlock program can be happened when one user lock a resource and need
          > to another resource that is locked by another user. You must use a deadlock
          > prevention technique.
          >
          > 2. Out of memory exception happened when you save more and more
          > information. You can optimize your saving in the memory to save as few as
          > possible in the memory. I don't if you can use
          > optimization technique or no. but you can search about this.
          >
          > I know that my experience is low but that is all from my knowledge
          >
          > AMAL ALI
          > ITI trainee
          >
          > Vinod J Nair <vinodjnair@... <vinodjnair%40gmail.com>> wrote: Hi,
          >
          > I am using AD DirSync in .Net2.0 using cookies and trying to retrieve
          > all user from a particular domain. I am getting the following errors:
          >
          > 1. When I run this code against a domain having less number of users,
          > it works fine except that it throws a message in my code saying
          > Context Switch Deadlock was detected. If I click continue the code
          > works fine and gives me the expected results. Here is the detailed
          > error:
          >
          > "The CLR has been unable to transition from COM context 0x1a0f98 to
          > COM context 0x1a1108 for 60 seconds. The thread that owns the
          > destination context/apartment is most likely either doing a non
          > pumping wait or processing a very long running operation without
          > pumping Windows messages. This situation generally has a negative
          > performance impact and may even lead to the application becoming non
          > responsive or memory usage accumulating continually over time. To
          > avoid this problem, all single threaded apartment (STA) threads
          > should use pumping wait primitives (such as CoWaitForMultipleHandles)
          > and routinely pump messages during long running operations."
          >
          > 2. When I am running the same code for a domaing having more than 1
          > lac records, it shows me the same error as described above and after
          > sometime it gives me "Out of memory" exception.
          >
          > Please suggest how to fix both these issues. Thanks in advance.
          >
          > Thanks & Regards,
          > Vinod
          >
          >
          >
          >
          >
          > ---------------------------------
          > Got a little couch potato?
          > Check out fun summer activities for kids.
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >


          [Non-text portions of this message have been removed]
        • amal ali mohamed
          If you reach your goal in this aspect. Please, send to me how you implement or recover your problems vinod vjn wrote:
          Message 4 of 10 , Jun 13, 2007
          • 0 Attachment
            If you reach your goal in this aspect. Please, send to me how you implement or recover your problems

            vinod vjn <vinodjnair@...> wrote: Thanks Amal for your suggestion & help. But i am looking for more input in
            technical terms to fix these issues.

            On 6/12/07, amal ali mohamed <amal_ali_mohamed@...> wrote:
            >
            >
            > Dear Sir,
            >
            > I know what is the cause of your problems from my viewpoint:
            >
            > 1. Deadlock program can be happened when one user lock a resource and need
            > to another resource that is locked by another user. You must use a deadlock
            > prevention technique.
            >
            > 2. Out of memory exception happened when you save more and more
            > information. You can optimize your saving in the memory to save as few as
            > possible in the memory. I don't if you can use
            > optimization technique or no. but you can search about this.
            >
            > I know that my experience is low but that is all from my knowledge
            >
            > AMAL ALI
            > ITI trainee
            >
            > Vinod J Nair <vinodjnair@... <vinodjnair%40gmail.com>> wrote: Hi,
            >
            > I am using AD DirSync in .Net2.0 using cookies and trying to retrieve
            > all user from a particular domain. I am getting the following errors:
            >
            > 1. When I run this code against a domain having less number of users,
            > it works fine except that it throws a message in my code saying
            > Context Switch Deadlock was detected. If I click continue the code
            > works fine and gives me the expected results. Here is the detailed
            > error:
            >
            > "The CLR has been unable to transition from COM context 0x1a0f98 to
            > COM context 0x1a1108 for 60 seconds. The thread that owns the
            > destination context/apartment is most likely either doing a non
            > pumping wait or processing a very long running operation without
            > pumping Windows messages. This situation generally has a negative
            > performance impact and may even lead to the application becoming non
            > responsive or memory usage accumulating continually over time. To
            > avoid this problem, all single threaded apartment (STA) threads
            > should use pumping wait primitives (such as CoWaitForMultipleHandles)
            > and routinely pump messages during long running operations."
            >
            > 2. When I am running the same code for a domaing having more than 1
            > lac records, it shows me the same error as described above and after
            > sometime it gives me "Out of memory" exception.
            >
            > Please suggest how to fix both these issues. Thanks in advance.
            >
            > Thanks & Regards,
            > Vinod
            >
            >
            >
            >
            >
            > ---------------------------------
            > Got a little couch potato?
            > Check out fun summer activities for kids.
            >
            > [Non-text portions of this message have been removed]
            >
            >
            >

            [Non-text portions of this message have been removed]






            ---------------------------------
            Boardwalk for $500? In 2007? Ha!
            Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.

            [Non-text portions of this message have been removed]
          • Vinod J Nair
            Posting my question again as I didn t receive any solution to these issues. ... wrote: Hi, I am using AD DirSync in .Net2.0 using cookies and
            Message 5 of 10 , Jun 22, 2007
            • 0 Attachment
              Posting my question again as I didn't receive any solution to these
              issues.

              --- In ADSIANDDirectoryServices@yahoogroups.com, "Vinod J Nair"
              <vinodjnair@...> wrote:

              Hi,

              I am using AD DirSync in .Net2.0 using cookies and trying to retrieve
              all user from a particular domain. I am getting the following errors:

              1. When I run this code against a domain having less number of users,
              it works fine except that it throws a message in my code saying
              Context Switch Deadlock was detected. If I click continue the code
              works fine and gives me the expected results. Here is the detailed
              error:

              "The CLR has been unable to transition from COM context 0x1a0f98 to
              COM context 0x1a1108 for 60 seconds. The thread that owns the
              destination context/apartment is most likely either doing a non
              pumping wait or processing a very long running operation without
              pumping Windows messages. This situation generally has a negative
              performance impact and may even lead to the application becoming non
              responsive or memory usage accumulating continually over time. To
              avoid this problem, all single threaded apartment (STA) threads
              should use pumping wait primitives (such as CoWaitForMultipleHandles)
              and routinely pump messages during long running operations."

              2. When I am running the same code for a domaing having more than 1
              lac records, it shows me the same error as described above and after
              sometime it gives me "Out of memory" exception.

              Please suggest how to fix both these issues. Thanks in advance.

              Thanks & Regards,
              Vinod

              --- End forwarded message ---
            • Richard Kline
              (subtitle: Riddle me this). Does anyone have an idea of which set of circumstances would produce this result? 1. Same iplanet LDAP server running on Solaris
              Message 6 of 10 , Jun 28, 2007
              • 0 Attachment
                (subtitle: Riddle me this).

                Does anyone have an idea of which set of circumstances would produce this
                result?

                1. Same iplanet LDAP server running on Solaris OS
                2. Same ASP.NET server code running on 2 servers (test and production)
                on two subnets. .Net 1.1 -- I think that they are patched the same....
                3. Same data requested of both servers

                1. .PropertiesToLoad.Add("cn")
                2. .PropertiesToLoad.Add("ou")
                3. .PropertiesToLoad.Add("telephonenumber")
                4. .PropertiesToLoad.Add("mailbox1")
                5. .PropertiesToLoad.Add("mailbox1")

                4. Same uid or SMTP address as part of filter
                5. The prod server receives (or at least displays) a less comprehensive
                result set. Results as follows:


                Filter

                test subnet server

                prod subnet server


                uid=

                returns all requested data

                returns cn only


                mailbox1= OR mailbox2l=

                returns all requested data

                returns no displayable data

                If one server didn't receive any data then I would suspect firewall or
                such. Completely different data would indicate a code problem. But
                different degrees of completeness? Oh, and this is entirely reproducable
                using completely differnet uid or mailbox names.

                Thank you.

                Rich



                [Non-text portions of this message have been removed]
              • Vinod J Nair
                I fixed this problem by running it as a windows service. ... implement or recover your problems ... Thanks Amal for your suggestion & help. But i am looking
                Message 7 of 10 , Jul 6, 2007
                • 0 Attachment
                  I fixed this problem by running it as a windows service.

                  --- In ADSIANDDirectoryServices@yahoogroups.com, amal ali mohamed
                  <amal_ali_mohamed@...> wrote:
                  >
                  > If you reach your goal in this aspect. Please, send to me how you
                  implement or recover your problems
                  >
                  > vinod vjn <vinodjnair@...> wrote:
                  Thanks Amal for your suggestion & help. But i am looking for more
                  input in
                  > technical terms to fix these issues.
                  >
                  > On 6/12/07, amal ali mohamed <amal_ali_mohamed@...> wrote:
                  > >
                  > >
                  > > Dear Sir,
                  > >
                  > > I know what is the cause of your problems from my viewpoint:
                  > >
                  > > 1. Deadlock program can be happened when one user lock a
                  resource and need
                  > > to another resource that is locked by another user. You must use
                  a deadlock
                  > > prevention technique.
                  > >
                  > > 2. Out of memory exception happened when you save more and more
                  > > information. You can optimize your saving in the memory to save
                  as few as
                  > > possible in the memory. I don't if you can use
                  > > optimization technique or no. but you can search about this.
                  > >
                  > > I know that my experience is low but that is all from my
                  knowledge
                  > >
                  > > AMAL ALI
                  > > ITI trainee
                  > >
                  > > Vinod J Nair <vinodjnair@... <vinodjnair%40gmail.com>> wrote: Hi,
                  > >
                  > > I am using AD DirSync in .Net2.0 using cookies and trying to
                  retrieve
                  > > all user from a particular domain. I am getting the following
                  errors:
                  > >
                  > > 1. When I run this code against a domain having less number of
                  users,
                  > > it works fine except that it throws a message in my code saying
                  > > Context Switch Deadlock was detected. If I click continue the
                  code
                  > > works fine and gives me the expected results. Here is the
                  detailed
                  > > error:
                  > >
                  > > "The CLR has been unable to transition from COM context 0x1a0f98
                  to
                  > > COM context 0x1a1108 for 60 seconds. The thread that owns the
                  > > destination context/apartment is most likely either doing a non
                  > > pumping wait or processing a very long running operation without
                  > > pumping Windows messages. This situation generally has a negative
                  > > performance impact and may even lead to the application becoming
                  non
                  > > responsive or memory usage accumulating continually over time. To
                  > > avoid this problem, all single threaded apartment (STA) threads
                  > > should use pumping wait primitives (such as
                  CoWaitForMultipleHandles)
                  > > and routinely pump messages during long running operations."
                  > >
                  > > 2. When I am running the same code for a domaing having more
                  than 1
                  > > lac records, it shows me the same error as described above and
                  after
                  > > sometime it gives me "Out of memory" exception.
                  > >
                  > > Please suggest how to fix both these issues. Thanks in advance.
                  > >
                  > > Thanks & Regards,
                  > > Vinod
                  > >
                  > >
                  > >
                  > >
                  > >
                  > > ---------------------------------
                  > > Got a little couch potato?
                  > > Check out fun summer activities for kids.
                  > >
                  > > [Non-text portions of this message have been removed]
                  > >
                  > >
                  > >
                  >
                  > [Non-text portions of this message have been removed]
                  >
                  >
                  >
                  >
                  >
                  >
                  > ---------------------------------
                  > Boardwalk for $500? In 2007? Ha!
                  > Play Monopoly Here and Now (it's updated for today's economy) at
                  Yahoo! Games.
                  >
                  > [Non-text portions of this message have been removed]
                  >
                • Aaron Seet
                  I have been following the tutorial How To: Use ADAM for Roles in ASP.NET 2.0 on a stand-alone winXP
                  Message 8 of 10 , Jul 7, 2007
                  • 0 Attachment
                    I have been following the tutorial How To: Use ADAM
                    <http://msdn2.microsoft.com/en-us/library/ms998331.aspx> for Roles in
                    ASP.NET 2.0 on a stand-alone winXP with success. However, when i start
                    moving up the next step of implementing ADAM in an actual domain
                    environment, i am getting HRESULT errors.



                    Here is what i have setup:

                    1. A single DC (TESTDC) that operates testdomain.org

                    2. It has a user AppAdmin which belongs to the AppAdmins group that is
                    supposed to take care of the ADAM store.

                    3. A development workstation (XPBASE) that is a member of the domain.

                    4. ADAM partition installed in the winXP computer -
                    CN=Authorization,DC=group,DC=testdomain,DC=org

                    5. AzMan store therefore located at
                    msldap://localhost/CN=AzManStore,CN=Authorization,DC=
                    group,DC=testdomain,DC=org

                    6. ADAM was originally installed by AppAdmin and therefore the
                    administrator; i do not know how to view and change this properly.

                    7. After moving code from the stand-alone winXP (which works) to the
                    domain-member winXP, I encounter errors when trying to call
                    Roles.GetAllRoles(), the Role management API from ASP.NET

                    a. When using Visual Studio's webdev server (cassini) and AppAdmin as
                    the developer - System.Runtime.InteropServices.COMException: Element not
                    found. (Exception from HRESULT: 0x80070490)

                    b. When using IIS and ASPNET (worker process account) -
                    System.IO.FileNotFoundException: The system cannot find the file specified.
                    (Exception from HRESULT: 0x80070002)



                    XPBASE\ASPNET has already been assigned Administrator role of the AzMan
                    store in ADAM. What i cannot understand, and find out similar encounters by
                    others, is why there are different errors based on the access scenario, and
                    what are causing them.



                    Any ideas?



                    Aaron



                    [Non-text portions of this message have been removed]
                  • Aaron Seet
                    I found what s the problem to 7a) the roleManager s provider (RoleManagerAzManADAMProvider) had a typo error to the applicationName, leading to element not
                    Message 9 of 10 , Jul 8, 2007
                    • 0 Attachment
                      I found what's the problem to 7a) the roleManager's provider
                      (RoleManagerAzManADAMProvider) had a typo error to the applicationName,
                      leading to element not found when trying to look for an application of that
                      erroneous name.



                      However, 7b) still persists with the same error. Looks like I am missing
                      something else that is causing ASPNET to fail to see some file.



                      Aaron



                      From: ADSIANDDirectoryServices@yahoogroups.com
                      [mailto:ADSIANDDirectoryServices@yahoogroups.com] On Behalf Of Aaron Seet
                      Sent: Sunday, 8 July, 2007 13:05




                      7. After moving code from the stand-alone winXP (which works) to the
                      domain-member winXP, I encounter errors when trying to call
                      Roles.GetAllRoles(), the Role management API from ASP.NET

                      a. When using Visual Studio's webdev server (cassini) and AppAdmin as
                      the developer - System.Runtime.InteropServices.COMException: Element not
                      found. (Exception from HRESULT: 0x80070490)

                      b. When using IIS and ASPNET (worker process account) -
                      System.IO.FileNotFoundException: The system cannot find the file specified.
                      (Exception from HRESULT: 0x80070002)

                      XPBASE\ASPNET has already been assigned Administrator role of the AzMan
                      store in ADAM. What i cannot understand, and find out similar encounters by
                      others, is why there are different errors based on the access scenario, and
                      what are causing them.





                      [Non-text portions of this message have been removed]
                    • Aaron Seet
                      Discovered the problem - ASPNET must be assigned Reader role to the ADAM partition itself in order to access
                      Message 10 of 10 , Jul 12, 2007
                      • 0 Attachment
                        Discovered the problem - ASPNET must be assigned Reader role to the ADAM
                        partition <http://icelava.net/forums/1554/ShowThread.aspx> itself in order
                        to access the AzMan store.





                        From: ADSIANDDirectoryServices@yahoogroups.com
                        [mailto:ADSIANDDirectoryServices@yahoogroups.com] On Behalf Of Aaron Seet
                        Sent: Sunday, 8 July, 2007 17:01
                        To: ADSIANDDirectoryServices@yahoogroups.com
                        Subject: RE: [ADSI-DirSrv] AzMan & ADAM & ASP.NET - HRESULT 0x80070002 &
                        0x80070490



                        I found what's the problem to 7a) the roleManager's provider
                        (RoleManagerAzManADAMProvider) had a typo error to the applicationName,
                        leading to element not found when trying to look for an application of that
                        erroneous name.

                        However, 7b) still persists with the same error. Looks like I am missing
                        something else that is causing ASPNET to fail to see some file.

                        Aaron





                        [Non-text portions of this message have been removed]
                      Your message has been successfully submitted and would be delivered to recipients shortly.