Web API self hosted tests dieing

4 views
Skip to first unread message

Michael Powell

unread,
Jan 24, 2017, 3:28:41 PM1/24/17
to aut...@googlegroups.com
Hello,

I am trying to test some tests involving Autofac container but they
are dying with Internal Server Error (500).

The same tests under Castle Windsor appear to be working just fine.

For reference, feel free to review
http://github.com/mwpowellhtx/MeasureIt, which is my focus. I have
been working on the Mvc portions, in particular, and a couple of
broader repo wide conventions, but the Web Api is for the most part,
but for this issue, fairly stable at this point.

Okay, I say the "same tests", but I did go through a round or three of
working through registered, or unregistered, services via my Castle
Windsor IDependencyResolver implementation.

So, I wonder if a similar thing is happening for Autofac. If so, how
can I dig into the rather opaque Internal Server 500 error?

My tests are arranged such that the request doesn't know/care about
where/how the self-hosted server is configured, started, etc. As I
said, works fine under Castle Windsor, but I want it to work for
Autofac in particular.

I have also set breakpoints and can say that the startup is at least
working, so there's that. So whatever it is, there must be some
service or other that is failing to resolve.

Of note, I am using the AutofacWebApiDependencyResolver, which I have
not dug into yet to find out more details on what/how is or is not
being registered and so on.

Thoughts? I'm going to continue digging and see if I can't glean any
other details.

Thank you...

Regards,

Michael Powell
Reply all
Reply to author
Forward
0 new messages