This project is read-only.

Value cannot be null. Parameter name: serviceKey

Topics: Troubleshooting
Mar 25, 2011 at 9:16 PM

No customization, just downloaded the lastest from source, opened the solution in vs 2010, hit the little green arrow, was prompted to setup up the site, then goto edit the page content type:


And I get the error in HttpAsyncHandler.BeginProcessRequest. Very hard to trace down problems when the stack looks like this:


>Orchard.Framework.DLL!Orchard.Mvc.Routes.ShellRoute.HttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext context, System.AsyncCallback cb, object extraData) Line 148 + 0x5 bytes
[External Code]


Mar 25, 2011 at 9:56 PM
Edited Mar 25, 2011 at 10:02 PM

Version: 1.0.20

I downloaded:

This doesn't 'break' the page, you can just skip over it.

Mar 26, 2011 at 12:38 AM

I can't reproduce this on the latest dev branch.

Mar 28, 2011 at 8:18 PM
Edited Mar 28, 2011 at 8:50 PM

Well that's helpful. I'll work through the problem myself and post my findings.

Mar 28, 2011 at 9:22 PM
Edited Mar 28, 2011 at 9:23 PM

ShellRoute.BeginProcessRequest invoked 3 times when handling request for "Admin/ContentTypes/Edit/Page"

1st go-thru:
OrchardControllerFactory.GetControllerType is invoked

  • areaName = Orchard.ContentTypes. 
  • serviceKey = orchard.contenttypes/admin
  • ... whatever things seem to go smoothly

2nd go-thru:
_httpAsyncHandler.BeginProcessRequest doesn't seem to do anything, but f11 on the last line of BeginProcessRequest and something to do with Filters happens

3rd go-thru:

  • OrchardControllerFactory.GetControllerType is invoked
    • areaName = Orchard.Modules
    • serviceKey = orchard.modules/orchard.contenttypes
    • Returns Null
  • OrchardControllerFactory.GetControllerInstance
    • since GetControllerType returned null, when this method calls TryResolve<T>, it errors out when trying to construct a new KeyedService


Apr 1, 2011 at 12:20 AM

I'd love to help but I'm not sure what the repro steps are.

Apr 1, 2011 at 12:22 AM

It happens to me randomly on my 1.0.20 instance. Haven't noticed it in 1.1 at all so hopefully it's fixed.