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]
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.
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.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Contributor
3105 Points
2122 Posts
IContentNegotiator Unity exception
Feb 12, 2015 12:38 PM|Xequence|LINK
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.
Credentials
CurbSmash
All-Star
45489 Points
7008 Posts
Microsoft
Re: IContentNegotiator Unity exception
Feb 13, 2015 02:01 AM|Zhi Lv - MSFT|LINK
Hi Xequence,
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.
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.
The following is the Web API forum address: http://forums.asp.net/1246.aspx/1/20?Web+API
Best Regards,
Dillion