Intro:I once had a strange error when trying acces sitecore Backend or Frontend. After roll back App_Config and bin folder the error still was there. If I check web.config I relized it was way smaller then usually in a Sitecore 8.
The error of "Attempted to access an element as a type incompatible with the array." was a web.config of a recently added feature. When building it with gulp I overrides teh web.confi inthe website root.
Solution:In my recentrly added feature I set the web.config property "Build Action" to "None". That soled it for me.
Server Error in '/' Application.
Attempted to access an element as a type incompatible with the array.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.ArrayTypeMismatchException: Attempted to access an element as a type incompatible with the array.
Source File: d:\Source\...\BE\src\Foundation\Dictionary\code\App_Start\RazorGeneratorMvcStart.cs Line: 15
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2103.2