在MVC4应用程序中,我遇到了以下错误
Attempt by security transparent method 'Autofac.Integration.Mvc.RegistrationExtensions.RegisterControllers(Autofac.Cont ainerBuilder, System.Reflection.Assembly[])' to access security critical type 'Autofac.Builder.IRegistrationBuild
尽管我使用的是ConfigureAwait(false),但我还是在一些C#代码上遇到了死锁。不幸的是,我不能一直使用异步,所以我依赖于ConfigureAwait。在这两种情况下,当Autofac试图解析触发web request.The的数据库令牌时,程序都会死锁,奇怪的是,它工作了两次,但第三次失败了。(我已经将http请求替换为对google的调用):
public class AzureActiveDirectoryService : IAz