.NET Questions and Solutions

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘index’

Error messages when you use Live Meeting Intranet Portal: “Exception_1013: The Directory Service returned an exception” and “Inner Exception(1): Index was out of range”

Symptoms
When you use Microsoft Live MeetingIntranet Portal, you may receive the following error messages:

Exception_1013: The Directory Service returned an exception

Inner Exception(1): Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: indexThe call stack trace that is generated when this issue occurs may resemble the following call stack trace:

at System.Collections.ArrayList.get_Item(Int32 index)at System.DirectoryServices.ResultPropertyValueCollection.get_Item(Int32 index)at Microsoft. LiveMeeting.DirectoryService.GetDirectoryUser(AuthenticatedUser authUser)at Microsoft.LiveMeeting.Services.GetDirUser(AuthenticatedUser authUser)
Resolution
This issue occurs if you do not use Microsoft ASP.NET version 1.1.4322.
Additionally, this issue may occur if the Live Meeting Intranet Portal virtual directory is not set to use ASP.NET version 1.x.

BUG: “Index was out of range” error message when you access a Visual Basic .NET 2002 collection object that implements IList with -1 Base

Symptoms
When you use the IList interface with a Visual Basic .NET collection object in Visual Basic .NET (2002) before you use the Insert property, you can insert elements in the list at index -1. If you insert an element at index -1, you receive the following error message when you try to read the element by using the Item property at index -1:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Resolution
The IList index has a base of -1 instead of zero. Therefore, you can insert an element at index -1 even though MSDN documentation states that the IList index is zero-based. However, you receive an error when you try to read the value from the IList at index -1.

An unhandled exception of the ‘System.ArgumentException’ type occurs after you rename the columns of a DataSet object

Symptoms
After you rename the columns of a DataTable object in the DataSet, if you try to refer to the columns in case-insensitive manner, you receive the following exception:

An unhandled exception of type ‘System.ArgumentException’ occurred in system.data.dll
Additional information: Column ‘ColumnName’ does not belong to table ‘Tablename’.
Resolution
When you first create a column in a DataTable object of a DataSet, the name is added to two indexes: a case-sensitive index and a case-insensitive index. When you rename the column in a DataTable object, the new name is not added to the case-insensitive index. Therefore, when you rename a DataTable column, the ColumnName becomes case-sensitive.