Autofac.Mvc | ASP.NET MVC integration for Autofac | DevOps library
kandi X-RAY | Autofac.Mvc Summary
kandi X-RAY | Autofac.Mvc Summary
ASP.NET MVC integration for Autofac. Please file issues and pull requests for this package in this repository rather than in the Autofac core repo. If you're working with ASP.NET Core, you want Autofac.Extensions.DependencyInjection, not this package.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Autofac.Mvc
Autofac.Mvc Key Features
Autofac.Mvc Examples and Code Snippets
Community Discussions
Trending Discussions on Autofac.Mvc
QUESTION
I just installed autofac.Mvc5 6.0
on my .net framework 4.7.2
installation.
And without adding any code other than adding the nuget package I get this error:
Could not load file or assembly System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a or one of it's dependences. The found Assembly's manifest definition does not match the Assembly reference. (Exception from HRESULT: 0x80131040)
Anyone got any idea?
...ANSWER
Answered 2021-Jan-04 at 16:39You probably have another library that uses a different version of System.Runtime.CompilerServices.Unsafe
. What's in web.config
?
Did you tried bindingRedirect?
QUESTION
I upgraded my asp.net web app (targetFramework 4.5.2) from mvc 4 to 5 according to this link. The solution compiles without errors however at runtime I get:
The inheritance security rules were violated when the member "Autofac.Integration.Mvc.AutofacDependencyResolver.GetService (System.Type)" was overwritten. The security access of the overriding method must match the security access of the overwritten method.
I searched the forum but none of the related posts could help me to pin down the origin of the error. Trying to upgrade Autofac.Mcv4 to 5 (as suggested in the posts) failed (-> Autofac.Mcv5 does not target frameWork 4.5.2). Changing the targetFramework to 4.6 and 4.6.1 also did not allow to install Autofac.Mcv5.
Below I have listed the relevant packages installed in the main project:
...ANSWER
Answered 2020-May-04 at 04:48You forgot to update the Autofac.Mvc4 package to Autofac.Mvc5.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Autofac.Mvc
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page