Autofac Wcf Integration Security Problem
I've created a Wcf Service to back a Ajax page (.Net 3.5). It's hosted in IIS 6.1 Integrated Pipeline. (The rest of Autofac is setup correctly for Web Forms integration).
Everything works fine and dandy with the normal Wcf pipeline. However when I plug in the Autofac Wcf Integration (as per the Autofac wiki) I get this delightful exception:
[SecurityException: That assembly does not allow partially trusted callers.] Autofac.Integration.Wcf.AutofacHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) in c:\Wor开发者_如何学编程king\Autofac\src\Source\Autofac.Integration.Wcf\AutofacHostFactory.cs:78 System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +604 System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +46 System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +654
My Google-fu has failed me on finding a solution to this problem. Any insights or workarounds would be appreciated.
This problem is unrelated to Autofac.
When downloading executables / dlls, Vista and Windows 7 helpfully "block" those files.
To get my project working I had to find the Autofac DLLs I had downloaded and was referencing in my project, right click, Properties -> General -> "Unblock"
精彩评论