How to apply PolicyInjection in ASP.NET page?

Topics: Policy Injection Application Block
May 25, 2010 at 4:26 AM

I create a custom call handler and attribute, then I call PolicyInjection.Wrap(this.GetType(), this) in a page's constructor, then it will throw following exception:

Resolution of the dependency failed, type = "ASP.admin_test_aspx", name = "(none)".
Exception occurred while: while resolving.
Exception is: SynchronizationLockException - The read lock is being released without being held.

How can I do?

May 25, 2010 at 5:54 AM

The Unity Hands-on-Lab includes this scenario.  It can be downloaded here - http://www.microsoft.com/downloads/details.aspx?FamilyID=93A5E18F-3211-44EF-B785-C59BCEC4CD6F&displaylang=en&displaylang=en.  You may want to use Unity as most of the PIAB stuff have already been moved there.

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com

May 25, 2010 at 9:41 AM
Edited May 25, 2010 at 9:55 AM

Thanks for your replay,

I have see your posted URL, and I found it's for Enterprise Library 4.1. Currently, I want to use Enterprise Library 5.1 and Unity 2.0. I donwload the Hand-on-lab, I can't find any sample about how to intergrated Unity 2.0 and call handler in Asp.net.  I try to write a demo based on Unity 1.2's Hand-on-lab, but my custom handler cannot be applied under Untiy 2.0.

 

 

May 26, 2010 at 1:25 AM

Unity 2.0 Hands-On-Labs has just been released.  Here's the link to the download page - http://www.microsoft.com/downloads/details.aspx?FamilyID=4f8cd377-5522-4f45-a024-44a6ca5111ec&displaylang=en

For Unity questions, please post it in the Unity forum - http://unity.codeplex.com/Thread/List.aspx

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com