This article is a mirror article of machine translation, please click here to jump to the original article.

View: 19917|Reply: 0

[ASP.NET] System.IndexOutOfRangeException: 索引超出了数组界限

[Copy link]
Posted on 10/12/2016 1:38:42 PM | | | |
The index goes beyond the array boundary.

Description: An unhandled exception occurred during the execution of the current web request. Check the stack trace information for details about the error and where it came from in your code that caused the error.

Exception details: System.IndexOutOfRangeException: The index exceeded the array boundary.

Source error:


Line 4: <meta name="viewport" content="width=device-width" charset="utf-8" />
Line 5: <title>Index</title>
Line 6: @System.Web.Optimization.Styles.Render("~/Plugins/bootstrap/css")
Line 7: </head>
Line <body>8:

The problem of Styles.Render indexing exceeding the array boundary has not been resolved for a long time


This problem is caused by WebGrease, and you need to update WebGrease by nuget.

Solution:

Nuget:Install-Package WebGrease

Resources
http://stackoverflow.com/questions/21809904/stylebundle-index-was-outside-the-bounds-of-the-array




Previous:System.Web.Optimization cannot be found in .Net 4.5
Next:Juqery automatically selects the navigation bar menu
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com