arunkumarmcsd / autofac

Automatically exported from code.google.com/p/autofac
Other
0 stars 0 forks source link

Autofac integration with WebApi 5RC1 raises TypeLoadException #453

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Integrate the latest version of Autofac & the WebApi extension with the 
release candidate of the upcoming WebApi5 release.
2. Attempt to register any filter to the HttpSelfHostConfiguration via Autofac

What is the expected output? What do you see instead?
The problem is that the WebApi team have removed the 
AllowPartiallyTrustedCallers attribute from their assemblies which results in a 
TypeLoadException when Autofac tries to interact with the WebApi.

What version of Autofac are you using? On what version of .NET/Silverlight?
Autofac v3.1.1
Autofac for WebApi v3.1.0

Please provide any additional information below.

Original issue reported on code.google.com by b...@sobenz.co.nz on 5 Aug 2013 at 4:00

GoogleCodeExporter commented 8 years ago

Original comment by travis.illig on 8 Aug 2013 at 9:00

GoogleCodeExporter commented 8 years ago
Hi!

I run exactly into the same problem, here is the solution:

https://aspnetwebstack.codeplex.com/workitem/1209

I hope that since its an easy fix it will get into the nuget packages too.

Thanks,
Attila

Original comment by att...@eyedea.hu on 10 Aug 2013 at 12:07

GoogleCodeExporter commented 8 years ago
Hi I have made the appropriate security attribution changes to the Autofac 
WebApi expansion to get it to work with WebApi 5 RC1 and checked them in here: 
https://code.google.com/r/ben-autofac/ 

Original comment by b...@sobenz.co.nz on 14 Aug 2013 at 9:46

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi!
I have recompiled the solution with the .NET Framework 4.5, updated 
dependencies and   updated MVC and WebAPI packages to the final 5.0.0-rc1 
builds.
You can get it here: https://code.google.com/r/yuriyzhogolev-autofac/

Original comment by Yuriy.Zhogolev on 24 Aug 2013 at 6:40

GoogleCodeExporter commented 8 years ago
I have created a new NuGet package for Web API 5 RC1 that includes the fixes 
mentioned above.

https://www.nuget.org/packages/Autofac.WebApi5

It is currently in the ASP.NET 5 branch and will be merged into default when 
Web API goes RTW.

Thanks for your help and posting the links everyone.

Original comment by alex.meyergleaves on 2 Sep 2013 at 10:34

GoogleCodeExporter commented 8 years ago
It doesn't seem that this change has been merged to the default library yet. 
Any date on that?

Original comment by chris.dw...@gmail.com on 20 Nov 2013 at 9:11

GoogleCodeExporter commented 8 years ago
The final release was made under Autofac.WebApi2.

https://www.nuget.org/packages/Autofac.WebApi2

Web API 2 was the official "marketing" version despite the assembly version 
being 5.

Original comment by alex.meyergleaves on 21 Nov 2013 at 11:25