Jump to content

Recommended Posts

Posted

Hi there,

 

Thanks in advance for anyone reading my post and taking time to respond!

 

I have been playing around with the booking system and although everything appears to be working great when my staff users are logging out a System.ArgumentOutOfRangeException is thrown.

 

Having looked into this it would appear that for some reason none of my staff accounts are being imported into the system. Due to using Forefront Identity Manager all of my users are in that same OU which I have listed in the hapconfig with visibility for the booking system. The only thing that might be of interest is that my staff users have a different UPN to our student accounts but other than that I can't see why it imports all the student accounts fine but none of the staff even though they are all in the same OU.

 

The error page shows:

 

'userlist' has a SelectedValue which is invalid because it does not exist in the list of items.Parameter name: value 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: 'userlist' has a SelectedValue which is invalid because it does not exist in the list of items.Parameter name: value

 

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: 'userlist' has a SelectedValue which is invalid because it does not exist in the list of items.Parameter name: value] System.Web.UI.WebControls.ListControl.set_SelectedValue(String value) +12237685 HAP.Web.BookingSystem._new.Page_Load(Object sender, EventArgs e) +2314 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178

 

 

Any advice is greatly appreciated!

Posted
Ask them not to log out of the booking system page, it's bug in the code where it's doing the user select box lookup when a post back happens (as when you logout)
  • 3 weeks later...
Posted

Thanks for your reply Nick! Do you have any ideas why the staff users would not be showing in the 'Users to Book For' drop down when logged in as an admin?

 

Thanks in advance for your time.

  • 2 weeks later...
Posted

Thanks Nick, unfortunately yes. From my first post:

 

all of my users are in that same OU which I have listed in the hapconfig with visibility for the booking system
  • 4 weeks later...
Posted

Hi Nick,

 

I can't see anything wrong with the OU path, as I say all my users are in the same OU:

 

 

I do have nearly 4000 users in my domain which I am beginning to wonder if that is the issue as the drop down in the booking system only seems to show a fraction of them.

 

Thanks again for your time

Posted
Unfortunately not as with are using M$ Forefront Identity Manager :( Could you point me to the file that will contain the code for the drop down so I can have a play at getting it to render out a longer list?
Posted

Home Access Plus+ - Source Code

 

            foreach (UserInfo user in ADUtils.FindUsers(OUVisibility.BookingSystem))
               if (user.DisplayName == user.UserName)
                   userlist.Items.Add(new ListItem(user.UserName, user.UserName.ToLower()));
               else
                   userlist.Items.Add(new ListItem(string.Format("{0} - ({1})", user.UserName, user.Notes), user.UserName.ToLower()));
           userlist.SelectedValue = ADUser.UserName.ToLower();

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...