MvcSiteMapProvider icon indicating copy to clipboard operation
MvcSiteMapProvider copied to clipboard

Website crashes with non-obvious exception when at least one controller can't be created.

Open s-maksim opened this issue 7 years ago • 0 comments

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.

s-maksim avatar Sep 23 '16 11:09 s-maksim