locked
LDAP issue RRS feed

  • Question

  • User1230414635 posted

    Need help to resolve LDAP issue:

    I have deployed our code to one of the Windows Server 2008 and its working very fine.
    Same code with same setting I deployed to Windows Server 2012 and changed all the IIS settings exactly like Windows Server 2008 but getting error[System.ArgumentOutOfRangeException: Length cannot be less than zero.
    Parameter name: length] because in the code its returing zero record in SearchResultCollection src = ds.FindAll(); but same works in Windows Server 2008.

    can you please tell me what might be the root cause. Any separate installation requiered for LDAP or Active Directory ?

    Thanks.....

    Wednesday, March 26, 2014 8:16 AM

Answers

  • User-166373564 posted

    Hi santoshhegde

    santoshhegde

    Parameter name: length] because in the code its returing zero record in SearchResultCollection src = ds.FindAll(); but same works in Windows Server 2008.

    According to your description above, during you deploy this application to IIS8, and it throws the error message above.

    For this issue, if this is IIS issue, it's recommended to check log files in C:\inetpub\logs\FailedReqLogFiles, it will give more details to troubleshoot this issue.

    We can enable this Failed Request Tracing in the IIS by steps below,

    1. Open Internet Information Services (IIS) Manager:
    2. In the Connections pane, select the server connection, site, application, or directory for which you want to configure failed request tracing.
    3. In the Actions pane, click Failed Request Tracing...
    4. In the Edit Web Site Failed Request Tracing Settings dialog box, select the Enable check box to enable tracing, leave the default value or type a new directory where you want to store failed request log files in the Directory box, type the number of failed request trace files you want to store in the Maximum number of trace files box, and then click OK.

    In addition, it's also recommended to use the deployment strategies in the link below to deploy your app.

    ASP.NET Web Application Project Deployment Overview: http://msdn.microsoft.com/en-us/library/dd394698%28v=VS.100%29.aspx

    Moreover, you could also look into network environment, etc.

    I'm sure that one or more of these solutions should help solve your problem, but if the issue still persists after all of them, we might try looking into a few more advanced alternatives.

    Best regards

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 1, 2014 10:27 PM

All replies

  • User1508394307 posted

    The issue is unclear. Are they both in same domain? Are you accessing same active directory controller or ldap server? Is ldap query same on both servers? You could maybe try to query same request using ADSI Edit or even LDAP tool (e.g. LDAP Browser http://www.ldapbrowser.com/download.htm) and see if your query returns something. 

    Wednesday, March 26, 2014 8:48 AM
  • User1230414635 posted

    No both are different Windows Server. Not sure how to check whether same AD and LDAP installed in both the server (Windows Server 2008/Windows Server 2012)

    Wednesday, March 26, 2014 8:52 AM
  • User1508394307 posted

    I understand that servers are different. My question was about network environment. 

    Wednesday, March 26, 2014 10:06 AM
  • User1230414635 posted

    Runs under hp network. Set NetworkService in Application pool and Authentication Windows.

    Wednesday, March 26, 2014 10:30 AM
  • User1508394307 posted

    You didn't answer my questions so it's hard to determine the issue. 

    I suggest you run LDAP browser or ADSI edit and see if you get any result from there.

    Wednesday, March 26, 2014 11:08 AM
  • User-166373564 posted

    Hi santoshhegde

    santoshhegde

    Parameter name: length] because in the code its returing zero record in SearchResultCollection src = ds.FindAll(); but same works in Windows Server 2008.

    According to your description above, during you deploy this application to IIS8, and it throws the error message above.

    For this issue, if this is IIS issue, it's recommended to check log files in C:\inetpub\logs\FailedReqLogFiles, it will give more details to troubleshoot this issue.

    We can enable this Failed Request Tracing in the IIS by steps below,

    1. Open Internet Information Services (IIS) Manager:
    2. In the Connections pane, select the server connection, site, application, or directory for which you want to configure failed request tracing.
    3. In the Actions pane, click Failed Request Tracing...
    4. In the Edit Web Site Failed Request Tracing Settings dialog box, select the Enable check box to enable tracing, leave the default value or type a new directory where you want to store failed request log files in the Directory box, type the number of failed request trace files you want to store in the Maximum number of trace files box, and then click OK.

    In addition, it's also recommended to use the deployment strategies in the link below to deploy your app.

    ASP.NET Web Application Project Deployment Overview: http://msdn.microsoft.com/en-us/library/dd394698%28v=VS.100%29.aspx

    Moreover, you could also look into network environment, etc.

    I'm sure that one or more of these solutions should help solve your problem, but if the issue still persists after all of them, we might try looking into a few more advanced alternatives.

    Best regards

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 1, 2014 10:27 PM