MvcSiteMapProvider
MvcSiteMapProvider copied to clipboard
Website crashes with non-obvious exception when at least one controller can't be created.
Preconditions:
- MvcSiteMapProvider_SecurityTrimmingEnabled is set to True
- One controller with constructor that throws an exception
Steps:
Open any page.
Actual behavior:
Website crashes with the following exception: System.ArgumentNullException: Value cannot be null.
Expected behavior
Original exception is thrown.
P.S. In my case it appears when a WCF service endpoint is missing in Web.config. DI library tries to inject that service to controller via constructor and fails.