I am getting the following error quite often. Can someone shed some light on this? I am not sure why this is becoming more frequent. Thanks everyone. How do I fix this?
Server Error in '/' Application.
Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
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.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
Source Error:
Line 23: (System.ComponentModel.DataObjectMethodType.Select, False)> _
Line 24: Public Shared Function List(ByVal pagenum As Integer) As IDataReader
Line 25: Dim qry As New Query(Tables.Announcements)
Line 26: qry.AddWhere(Announcements.Columns.Itemdate, Comparison.LessOrEquals, DateTime.Now())
Line 27: qry.PageSize = ClubStarterKit.Web.Settings.PageSize()
[ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.]
I think these is some type mis-match between the the Object you are passing.
Check your code at below position :-
SubSonic.Query..ctor(String tableName) in C:\SubSonic 2.0.3\src\SubSonic\Sql Tools\Query.cs:613
Also check what this "Tables.Announcements" is holding.
If this is a Annoouncement class then check whether it is Serialize or not.
If this post answered your question or solved your problem, please Mark it as Answer.
I am not sure how to check what you have outlined. I am using the default VB version of ClubStarterKit and have made no changes to these classes. It must be a bug that I am sure otehrs are experiencing. I think the problem exists in the Announcement class
the SubSonic query I assume is out of the box. How do I check what the Tables.Announcements is holding?
dude9er
Member
49 Points
176 Posts
Consistent Getting the following Error
Sep 07, 2012 07:12 AM|LINK
I am getting the following error quite often. Can someone shed some light on this? I am not sure why this is becoming more frequent. Thanks everyone. How do I fix this?
Server Error in '/' Application.
Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
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.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
Source Error:
Line 25: Dim qry As New Query(Tables.Announcements)Source File: C:\HostingSpaces\somesite.com\wwwroot\App_Code\BLL\News.vb Line: 25
Stack Trace:
Rajesh Sawan...
Participant
1612 Points
246 Posts
Re: Consistent Getting the following Error
Sep 07, 2012 10:50 AM|LINK
Hi,
I think these is some type mis-match between the the Object you are passing.
Check your code at below position :-
SubSonic.Query..ctor(String tableName) in C:\SubSonic 2.0.3\src\SubSonic\Sql Tools\Query.cs:613
Also check what this "Tables.Announcements" is holding.
If this is a Annoouncement class then check whether it is Serialize or not.
//Happy Coding
Regards,
RajeshS.
dude9er
Member
49 Points
176 Posts
Re: Consistent Getting the following Error
Sep 07, 2012 04:09 PM|LINK
Hi Rajesh Sawant,
I am not sure how to check what you have outlined. I am using the default VB version of ClubStarterKit and have made no changes to these classes. It must be a bug that I am sure otehrs are experiencing. I think the problem exists in the Announcement class the SubSonic query I assume is out of the box. How do I check what the Tables.Announcements is holding?
Thanks!