locked
IContentNegotiator Unity exception RRS feed

  • Question

  • User1080785583 posted

    IntelliTrace response,

    Exception Settings:

    Exception:Caught: "Resolution of the dependency failed, type = "System.Net.Http.Formatting.IContentNegotiator", name = "(none)".
    Exception occurred while: while resolving.
    Exception is: InvalidOperationException - The type IContentNegotiator does not have an accessible constructor.
    -----------------------------------------------
    At the time of the exception, the container was:

    Resolving System.Net.Http.Formatting.IContentNegotiator,(none)
    " (Microsoft.Practices.Unity.ResolutionFailedException)
    A Microsoft.Practices.Unity.ResolutionFailedException was caught: "Resolution of the dependency failed, type = "System.Net.Http.Formatting.IContentNegotiator", name = "(none)".
    Exception occurred while: while resolving.
    Exception is: InvalidOperationException - The type IContentNegotiator does not have an accessible constructor.
    -----------------------------------------------
    At the time of the exception, the container was:

    Resolving System.Net.Http.Formatting.IContentNegotiator,(none)
    "
    Time: 2/12/2015 9:34:24 AM
    Thread:Worker Thread[8860]

    This is a Web API 2 project. Thanks in advance.

    Thursday, February 12, 2015 12:38 PM

All replies

  • User-271186128 posted

    Hi Xequence,<!--?xml:namespace prefix = "o" ns = "urn:schemas-microsoft-com:office:office" /--><o:p></o:p>

    As for this issue, just according to the exception settings, I can’t create a sample and test on my side and find the real reason. <o:p></o:p>

    Besides, since this issue is related to Web API. I suggest you could posting your problem to Web API forum. There are more Web API experts in that forum. <o:p></o:p>

    The following is the Web API forum address: http://forums.asp.net/1246.aspx/1/20?Web+API

    Best Regards,
    Dillion<o:p></o:p>

    Friday, February 13, 2015 2:01 AM