Created
May 30, 2011 04:48
-
-
Save fraga/998467 to your computer and use it in GitHub Desktop.
Two differents web.config regarding unity mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<configSections> | |
<section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> | |
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> | |
</configSections> | |
<exceptionHandling> | |
<exceptionPolicies> | |
<add name="UIExceptionPolicy"> | |
<exceptionTypes> | |
<add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" postHandlingAction="None" name="Exception"> | |
<exceptionHandlers> | |
<add type="AOPLearning.NotificationHandler, AOPLearning, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="Custom Handler" /> | |
</exceptionHandlers> | |
</add> | |
</exceptionTypes> | |
</add> | |
</exceptionPolicies> | |
</exceptionHandling> | |
<unity> | |
<typeAliases> | |
<typeAlias alias="string" type="System.String, mscorlib" /> | |
<typeAlias alias="singleton" type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager, Microsoft.Practices.Unity" /> | |
<typeAlias alias="interface" type="Microsoft.Practices.Unity.InterceptionExtension.InterfaceInterceptor, Microsoft.Practices.Unity.Interception" /> | |
<typeAlias alias="ExceptionCallHandler" type="Microsoft.Practices.EnterpriseLibrary.PolicyInjection.CallHandlers.ExceptionCallHandler, Microsoft.Practices.EnterpriseLibrary.PolicyInjection.CallHandlers" /> | |
<typeAlias alias="IAccountContract" type="AOPLearning.IAccountContract, AOPLearning" /> | |
<typeAlias alias="AccountService" type="AOPLearning.AccountService, AOPLearning" /> | |
</typeAliases> | |
<containers> | |
<container> | |
<types> | |
<type type="IAccountContract" mapTo="AccountService"> | |
<lifetime type="singleton" /> | |
</type> | |
<type type="ExceptionCallHandler" name="ExceptionCallHandler"> | |
<typeConfig> | |
<constructor> | |
<param name="exceptionPolicyName" parameterType="string"> | |
<value value="UIExceptionPolicy" /> | |
</param> | |
</constructor> | |
</typeConfig> | |
<lifetime type="singleton" /> | |
</type> | |
</types> | |
<extensions> | |
<add type="Microsoft.Practices.Unity.InterceptionExtension.Interception, Microsoft.Practices.Unity.Interception" /> | |
</extensions> | |
<extensionConfig> | |
<add name="interception" type="Microsoft.Practices.Unity.InterceptionExtension.Configuration.InterceptionConfigurationElement, Microsoft.Practices.Unity.Interception.Configuration"> | |
<interceptors> | |
<interceptor type="interface"> | |
<default type="IAccountContract" /> | |
<key type="IAccountContract" /> | |
</interceptor> | |
</interceptors> | |
<policies> | |
<policy name="IAccountContractPolicy"> | |
<callHandlers> | |
<callHandler type="ExceptionCallHandler" name="ExceptionCallHandler" /> | |
</callHandlers> | |
</policy> | |
</policies> | |
</add> | |
</extensionConfig> | |
</container> | |
</containers> | |
</unity> | |
</configuration> | |
<configuration> | |
<configSections> | |
<section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> | |
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> | |
</configSections> | |
<exceptionHandling> | |
<exceptionPolicies> | |
<add name="UIExceptionPolicy"> | |
<exceptionTypes> | |
<add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" postHandlingAction="None" name="Exception"> | |
<exceptionHandlers> | |
<add type="AOPLearning.NotificationHandler, AOPLearning, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="Custom Handler" /> | |
</exceptionHandlers> | |
</add> | |
</exceptionTypes> | |
</add> | |
</exceptionPolicies> | |
</exceptionHandling> | |
<unity> | |
<typeAliases> | |
<typeAlias alias="string" type="System.String, mscorlib" /> | |
<typeAlias alias="singleton" type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager, Microsoft.Practices.Unity" /> | |
<typeAlias alias="interface" type="Microsoft.Practices.Unity.InterceptionExtension.InterfaceInterceptor, Microsoft.Practices.Unity.Interception" /> | |
<typeAlias alias="IAccountContract" type="AOPLearning.IAccountContract, AOPLearning" /> | |
<typeAlias alias="AccountService" type="AOPLearning.AccountService, AOPLearning" /> | |
</typeAliases> | |
<containers> | |
<container> | |
<types> | |
<type type="IAccountContract" mapTo="AccountService"> | |
<lifetime type="singleton" /> | |
</type> | |
</types> | |
<extensions> | |
<add type="Microsoft.Practices.Unity.InterceptionExtension.Interception, Microsoft.Practices.Unity.Interception" /> | |
</extensions> | |
<extensionConfig> | |
<add name="interception" type="Microsoft.Practices.Unity.InterceptionExtension.Configuration.InterceptionConfigurationElement, Microsoft.Practices.Unity.Interception.Configuration"> | |
<interceptors> | |
<interceptor type="interface"> | |
<default type="IAccountContract" /> | |
<key type="IAccountContract" /> | |
</interceptor> | |
</interceptors> | |
</add> | |
</extensionConfig> | |
</container> | |
</containers> | |
</unity> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment