Sunday, March 1, 2009

Common Service Locator Adapter for LinFu 2.0 Released!

Now that LinFu.IOC 2.0 is officially out, it's time to join the rest of the IOC container pack and let users try out LinFu without tying them to any specific IOC container API. The adapter for LinFu makes it possible to use the Common Service Locator interfaces to make your applications completely container-agnostic, so if you haven't tried LinFu yet, download the adapter, and give it a shot. :)

3 comments:

  1. Dear Philip,
    thank you for the effort you've put into this project! I am trying to run linfu (via the CSL) in an ASP.Net application. I got a SecurityException running in medium trust and had to change to full. I would nevertheless like for the application to run in mudium trust, is this possible? I have tried to use a build that included the AllowPartiallyTrustedCallers in the AssemblyInfo (hint from: http://code.google.com/p/linfu/source/diff?spec=svn395&r=395&format=side&path=/tags/1.01-Final/2.0/LinFu.DynamicProxy/AssemblyInfo.cs), but still getting the SecurityException. Do you have any thoughts on this?

    ReplyDelete
  2. Hi Anonymous,

    If you can send me a test case that duplicates the error, I would be more than happy to track it down and see if I can fix it for you. Do you at least have a stack trace so that I can take a look at it? And thanks for the kind words. :)

    Regards,

    Me

    ReplyDelete
  3. Dear Philip,

    thank you for the reply.
    I re-tried running linfu in an ASP.Net application with medium trust and it worked! Here are the steps I used:

    - Got the latest from trunk (svn checkout http://linfu.googlecode.com/svn/trunk/ linfu-read-only)
    - Altered C:\Drops\linfu\linfu-read-only\src\CommonAssemblyInfo.cs:
    1. ADDED using System.Security;
    2- ADDED [assembly: AllowPartiallyTrustedCallers]
    - Rebuilt LinFu.Core.dll using go.bat with the merge option
    - Rebuilt CommonServiceLocator.LinFuAdapter (after changing the target framework to 3.5 and removeing the reference to LinqBrindge.dll)
    - Set trust level to medium in web.config

    That did it, and sorry for the false alarm!

    Greetings

    Nasser

    ReplyDelete

Ratings by outbrain