Answered by:
Error when Debug

Question
-
User1677213486 posted
Hi. Everybody can help me fix error
Code page asp have only a buton
When Debug it display
Server Error in '/' Application.
Specified argument was out of the range of valid values.
Parameter name: siteDescription: 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: Specified argument was out of the range of valid values.
Parameter name: site
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: Specified argument was out of the range of valid values. Parameter name: site] System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +298 [HttpException (0x80004005): Specified argument was out of the range of valid values. Parameter name: site] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9874568 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18044<html:embed type="application/x-asc-plugin" id="pluginIdTFPU_2" width="0" height="0"></html:embed>
Wednesday, June 19, 2013 1:05 AM
Answers
-
User-68639941 posted
hi, it a generic error you will get when refer a wrong index i.e index which is not available in a collection or arry etc.
i.e suppose if you are having an array with 5 values then the index starts from 0 and ends with 4. the same applies to any collection like grid.Rows or array of objects etc.,
you will get System.ArgumentOutOfRangeException error when you refer index < 0 or > 4 of collection which has only 5 items.
Refer : http://msdn.microsoft.com/en-us/library/system.argumentoutofrangeexception.aspx
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, June 19, 2013 1:13 AM
All replies
-
User-68639941 posted
hi, it a generic error you will get when refer a wrong index i.e index which is not available in a collection or arry etc.
i.e suppose if you are having an array with 5 values then the index starts from 0 and ends with 4. the same applies to any collection like grid.Rows or array of objects etc.,
you will get System.ArgumentOutOfRangeException error when you refer index < 0 or > 4 of collection which has only 5 items.
Refer : http://msdn.microsoft.com/en-us/library/system.argumentoutofrangeexception.aspx
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, June 19, 2013 1:13 AM -
User-1716253493 posted
Try change your web to net 4.5
Wednesday, June 19, 2013 2:45 AM