in

CodeSmith Community

Your Code. Your Way. Faster!

How to implement Enterprise Library in a Medium Trust Environment

Last post 09-29-2007 3:52 AM by sujithukvl@gmail.com. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-06-2006 2:27 AM

    • pascald
    • Top 150 Contributor
    • Joined on 11-23-2005
    • Posts 36
    • Points 1,025

    How to implement Enterprise Library in a Medium Trust Environment

    For who is intrested, these are steps that solved the problem for me (there are several threads here on the forum that point to this solution, consider this as a synthesis ..., so all credits to the people that helped (thanks Robert))

    1. Download the latest version of Enterprise Library : http://msdn.microsoft.com/library/?url=/library/en-us/dnpag2/html/EntLib2.asp and install (by default, it will be installed under C:\Program Files\Microsoft Enterprise Library January 2006)
    2. Download the patch to run EnterPriselibrary in Medium trust : http://blogs.msdn.com/tomholl/archive/2006/06/30/652955.aspx (search patch 2554 in the text, can't link to it because you first need to register (it's on www.gotdotnet.com)
    3. Replace the src and de unittests directories from the Enterprise library by the ones in the patch
    4. Open the Enterprise library solution in VS2005 and rebuild
    5. Replace the references in your webproject (Microsoft.Practices......dll) by the newly compiled under the enterprise library. Warning : all the dll's seem to be gathered in one bin directory under the enterprise library. I first used these but that didn't seem to solve the problem, then I restarted and picked the ones under each individual directory (caching, logging, etc ...) and the 2nd attempt worked, but I don't see why the first attempt  didn't work, maybe I did something wrong that 1st time.
    6. Change the web.config, add requirePermission="false" to the <section name="netTiersService" type="MySan.DataAccessL .... line (ignore the warning you will get about the non declared attribute)
    7. Rebuild your webproject and publish ... with a little luck it will work (for me it did ...)

     

     

     

     

    • Post Points: 95
  • 09-06-2006 8:51 AM In reply to

    • GRAW
    • Top 25 Contributor
    • Joined on 06-23-2006
    • Posts 157
    • Points 4,560

    Re: Medium/full trust problem - current status ?

    Pascal,
    in your step 4, instead of building by opening the solution in VS2005, you should run 2 batch files which come with the EntLib.
    First, run BuildLibrary.bat, then CopyAssemblies.bat (both files are to be found in the same folder as the solution files).  Once that's done, you can find the most current assemblies in the bin directory.
    "Small is the number of them that see with their own eyes, and feel with their own hearts" Albert Einstein
    • Post Points: 5
  • 05-08-2007 12:47 PM In reply to

    • xmlsteve
    • Not Ranked
    • Joined on 05-08-2007
    • Seattle WA
    • Posts 1
    • Points 5

    Re: How to implement Enterprise Library in a Medium Trust Environment

    I had to do a few additional tasks to get this to work:

    1. Be very careful to only include references to Enterprise Library that are really needed

    2. Merge Enterprise Library assemblies using ilmerge (see Reply 21 here http://forums.crystaltech.com/index.php/topic,29566.msg175721.html#msg175721, referring to http://research.microsoft.com/~mbarnett/ILMerge.aspx )

    3. Update References for all generated nettiers projects to use the merged single assembly

     

    • Post Points: 5
  • 09-29-2007 3:52 AM In reply to

    Re: How to implement Enterprise Library in a Medium Trust Environment

     This is a very usefull post i ever seen Thank you,

    But after doing this ,break points are not working in this project

    :(  ;( 

     

    What can i do  to get break points back

     

    • Post Points: 5
Page 1 of 1 (4 items)
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems