Wayne Douglas - 83 - Jun 26, 2014

I’m getting this error on one of my websites, just started happening out of the blue - any ideas what would be causing this?!

http://pastebin.com/kZ1jSBka

This looks very strange, it looks like it’s originating from this method: https://github.com/ServiceStack/ServiceStack/blob/558f2cca77cf9cacc41d8475cf787b9f8db712fc/src/ServiceStack/ServiceStackHost.Runtime.cs#L322

But there’s no code-gen there or anything else that I can see that would create an InvalidProgramException. The weird thing is that it looks like it’s the result of creating a new instance, but the only possible instances being created:
is new NotFoundHttpHandler() which doesn’t have a default constructor and new ServiceStackHttpHandler(ssHandler) which is harmless: https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack/ServiceStackHttpHandler.cs#L13

Is there anything strange on that website? i.e. resources being maxed out or anything out of the ordinary like running unsafe code.?

Wayne Douglas:

Nope - in fact the site used to work on my old laptop, copied it over to my new laptop and it was working for a few runs then this started happening

Is it possible to send me a copy that I can try repro locally?

Wayne Douglas:

I’ll add you to the repo… 

Wayne Douglas:

If you don’t have a xamarin license just remove all of the mobile projects. The project in question is the [ProjectName].Web project…

Wayne Douglas:

I think this might be something wrong with my laptop :confused: just tried to fire up another site and getting similar weirdness

Wayne Douglas:

Sorry - the other one is working… must have just been having a funny 5

k cool thx
__________

Wayne Douglas:

So the one I gave you access to is still not working yeh

Ran into a couple of issues, it’s telling me I need 4.5.1 installed. Also I can’t build the entire solution because it can’t find Cirrious. 

But just building the WebHost what API repro’s the error? I’m hitting /Api/Model/User and /Api/Model/User/1 a bunch of times and haven’t been able to generate any errors…

Wayne Douglas:

Hmmm… might need to pull nugets, I wonder if there is something wrong with my laptop… It’s a work one so has been used by someone else before me. I’ll have a go on another machine