Server Error in '/' Application.

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:


Line 64: 
Line 65:                             var db = Database.Open("VceConnectionString");
Line 66:                             var ay = Request.QueryString[0];
Line 67:                             var selectQueryString = "SELECT * FROM Syllabus WHERE department='Civil' and Academic_year = " + "'" + ay + "'";
Line 68: 

Source File: c:\inetpub\vhosts\vce.ac.in\httpdocs\Academics\Syllabus\Syllabus_Civil.cshtml    Line: 66

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) +12798930
   System.Collections.Specialized.NameValueCollection.GetKey(Int32 index) +15
   System.Web.HttpValueCollection.Get(Int32 index) +20
   System.Collections.Specialized.NameValueCollection.get_Item(Int32 index) +12
   ASP._Page_Academics_Syllabus_Syllabus_Civil_cshtml.Execute() in c:\inetpub\vhosts\vce.ac.in\httpdocs\Academics\Syllabus\Syllabus_Civil.cshtml:66
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +198
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +69
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +131
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +116


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3930.0