Jump to content

Recommended Posts

Posted

Morning Guys,

 

Not sure if there's an easy fix or if I did something wrong with this but seems if people try to log in and put an incorrect user name it bombs out:

(also if you put the domain name during login as guessing that's counted as a "wrong username")

 

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index 
 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error: 


An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 



[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
  System.Collections.ArrayList.get_Item(Int32 index) +14310269
  System.DirectoryServices.SearchResultCollection.get_Item(Int32 index) +28
  HAP.AD.User.UserAccountControl(String username) +146
  HAP.Web.Login.login_Click(Object sender, EventArgs e) +1009
  System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +153
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804

 

Thanks,

Steve

Posted

Guessing it's trying to pull "something" from data it pulls off a user and isn't returning the data so erroring if it's missing a check somewhere :( Just hoped it might be something silly I did, as was looking to roll it out over Summer and our users can't ever type stuff right haha :D

 

Steve

Posted
We find it helps scare them into typing properly :p

 

Also makes it nice and easy for external "people" to test if certain user accounts exist on your network though :p

 

Steve

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...