2013-08-21 2 views
0

Я работаю через развертывание веб-сайта ASP.NET MVC на IIS 7.5, и я испытываю следующее сообщение об ошибке:EntLibContrib.Data.OdpNet.OracleDatabase Не Разрешающая

[ArgumentException: The type 'EntLibContrib.Data.OdpNet.OracleDatabase, EntLibContrib.Data.OdpNet, Version=5.0.505.0, Culture=neutral, PublicKeyToken=null' cannot be resolved. Please verify the spelling is correct or that the full type name is provided.] 
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.AssemblyQualifiedTypeNameConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +189 
    Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DbProviderMapping.get_DatabaseType() +48 
    Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetDatabaseData(ConnectionStringSettings connectionString, DatabaseSettings databaseSettings) +38 
    Microsoft.Practices.EnterpriseLibrary.Data.Configuration.<get_Databases>d__0.MoveNext() +272 
    System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +460 
    System.Linq.Enumerable.ToList(IEnumerable`1 source) +58 
    Microsoft.Practices.EnterpriseLibrary.Data.Configuration.<DoGetRegistrations>d__10.MoveNext() +137 
    System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +85 
    System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +381 
    System.Linq.Enumerable.ToList(IEnumerable`1 source) +58 
    Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetRegistrations(IConfigurationSource configurationSource) +161 
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.TypeLoadingLocator.<GetRegistrations>b__0(ITypeRegistrationsProvider p, IConfigurationSource cs) +8 
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.TypeLoadingLocator.GetRegistrationsInternal(IConfigurationSource configurationSource, Func`3 registrationAccessor) +74 
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.TypeLoadingLocator.GetRegistrations(IConfigurationSource configurationSource) +80 
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.CompositeTypeRegistrationsProviderLocator.<GetRegistrations>b__0(ITypeRegistrationsProvider l, IConfigurationSource cs) +8 
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.<>c__DisplayClass5.<GetRegistrationsInternal>b__4(ITypeRegistrationsProvider l) +16 
    System.Linq.<SelectManyIterator>d__14`2.MoveNext() +234 
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.Unity.UnityContainerConfigurator.RegisterAllCore(IConfigurationSource configurationSource, ITypeRegistrationsProvider rootProvider) +127 
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ContainerModel.ChangeTrackingContainerConfigurator.RegisterAll(IConfigurationSource configurationSource, ITypeRegistrationsProvider rootProvider) +23 
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.ConfigureContainer(ITypeRegistrationsProvider locator, IContainerConfigurator configurator, IConfigurationSource configSource) +19 
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.ConfigureContainer(IContainerConfigurator configurator, IConfigurationSource configSource) +117 
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.CreateDefaultContainer(IConfigurationSource configurationSource) +59 
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.SetCurrentContainerIfNotSet() +80 
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.EnterpriseLibraryContainer.get_Current() +5 
    InventoryScanner.DataAccess.RepositoryBase..ctor() in c:\Users\michaelj\Desktop\warehouse server\InventoryScanner\InventoryScanner\InventoryScanner.DataAccess\RepositoryBase.cs:56 
    InventoryScanner.DataAccess.ScannerRepository..ctor() in c:\Users\michaelj\Desktop\warehouse server\InventoryScanner\InventoryScanner\InventoryScanner.DataAccess\ScannerRepository.cs:18 
    InventoryScanner.Common.Logger.LogHelper..ctor() in c:\Users\michaelj\Desktop\warehouse server\InventoryScanner\InventoryScanner\InventoryScanner.Common.Logger\LogHelper.cs:26 
    InventoryScanner.Web.Filters.LogExceptionFilterAttribute..ctor() in c:\Users\michaelj\Desktop\warehouse server\InventoryScanner\InventoryScanner\InventoryScanner.Web.Filters\Filters.cs:19 
    InventoryScanner.Web.WebApiConfig.Register(HttpConfiguration config) in c:\Users\michaelj\Desktop\warehouse server\InventoryScanner\InventoryScanner\InventoryScanner.Web\App_Start\WebApiConfig.cs:45 
    InventoryScanner.Web.WebApiApplication.Application_Start() in c:\Users\michaelj\Desktop\warehouse server\InventoryScanner\InventoryScanner\InventoryScanner.Web\Global.asax.cs:21 

[HttpException (0x80004005): The type 'EntLibContrib.Data.OdpNet.OracleDatabase, EntLibContrib.Data.OdpNet, Version=5.0.505.0, Culture=neutral, PublicKeyToken=null' cannot be resolved. Please verify the spelling is correct or that the full type name is provided.] 
    System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9859725 
    System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118 
    System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172 
    System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336 
    System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296 

[HttpException (0x80004005): The type 'EntLibContrib.Data.OdpNet.OracleDatabase, EntLibContrib.Data.OdpNet, Version=5.0.505.0, Culture=neutral, PublicKeyToken=null' cannot be resolved. Please verify the spelling is correct or that the full type name is provided.] 
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9873912 
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 
    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254 

Мои исследования показали, что аспект DI EntLib не позволяет правильно разрешить EntLibContrib.Data.OdpNet.dll, несмотря на то, что он находится в каталоге bin веб-сайта.

Я разобрался и выровнял строку ArgumentException и EntLibContrib.Data.OdpNet.OracleDatabase, но не увидел ничего такого, что приблизило меня к тому, что я уже сказал.

Я не писал это приложение, и у меня нет опыта или понимания EntLib. Я спросил человека, который написал заявку на прошлой неделе и до сих пор не слышал от него, поэтому я надеюсь, что кто-то здесь поможет мне.

ответ

0

Это оказалось проблемой при установке. К сожалению, детали не были обнаружены. Мы переделали его, и он сработал.

0

У меня такой же опыт с вами, при работе с моим сайтом с визуальной студией, У меня появилось сообщение ArgumentException во время работы моего сайта с визуальной студией.

В моем случае у меня есть метод onLoad в моей реализации WebBase.

Итак, я добавляю инструкцию try catch в свой код, в котором возникла проблема. Фактически, пропустить его, даже если произошло какое-то исключение.

try 
{ 
    base.OnLoad(e); 
} 
catch (ArgumentException e1) 
{ 
    Console.WriteLine(e1.StackTrace); 
} 
catch (Exception e1) 
{ 
    Console.WriteLine(e1.StackTrace); 
} 

Затем сообщите компилятору об этом исключении, сняв флажок «остановить при возникновении этого исключения». Это все.

+0

Вы должны написать свой собственный вопрос с более подробной информацией о своей конкретной ситуации и ответить на него самостоятельно. Это не имеет отношения к моей проблеме и не подходит в качестве ответа на него. – Stuporman

Смежные вопросы