我有一个使用 Enterprise Library 4.1 的 Web 应用程序。一位同事将 Web 应用程序使用的身份验证模块升级到 Enterprise Library 5.0。不幸的是,身份验证模块的升级版本包含我需要的新功能,所以我必须在我的项目中包含升级后的模块。我现在收到以下异常:
[A]Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection
cannot be cast to [B]Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection.
Type A originates from 'Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' in the context 'Default' at location
'C:\Windows\assembly\GAC_MSIL\Microsoft.Practices.EnterpriseLibrary.Common\4.1.0.0__31bf3856ad364e35\Microsoft.Practices.EnterpriseLibrary.Common.dll'.
Type B originates from 'Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' in the context 'Default' at location
'C:\Windows\assembly\GAC_MSIL\Microsoft.Practices.EnterpriseLibrary.Common\5.0.414.0__31bf3856ad364e35\Microsoft.Practices.EnterpriseLibrary.Common.dll'.
有什么方法可以在我的应用程序中使用升级后的身份验证模块而不升级到 EL 5.0?