2015-08-10 4 views
0

Я пытаюсь использовать Elmah plugin for Azure Table Storage, но это исключение.Не удалось загрузить тип «Microsoft.WindowsAzure.CloudConfigurationManager»

[TypeLoadException: Could not load typ'Microsoft.WindowsAzure.CloudConfigurationManager' from assembly 'Microsoft.WindowsAzure.Configuration, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.] 
    Elmah.AzureTableStorage.ElmahHelper.GetConnectionString(IDictionary config) +0 
    Elmah.AzureTableStorage.AzureTableStorageErrorLog..ctor(IDictionary config) +44 

[TargetInvocationException: Exception has been thrown by the target of an invocation.] 
    System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0 
    System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +225 
    System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1117 
    System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +124 
    System.Activator.CreateInstance(Type type, Object[] args) +21 
    Elmah.SimpleServiceProviderFactory.CreateFromConfigSection(String sectionName) +202 
    Elmah.ErrorLog.GetDefaultImpl(HttpContext context) +117 
    Elmah.ServiceContainer.GetService(Type serviceType) +49 
    Elmah.ServiceCenter.FindService(Object context, Type serviceType) +25 
    Elmah.ServiceCenter.GetService(Object context, Type serviceType) +31 
    Elmah.ErrorLog.GetDefault(HttpContext context) +22 
    Elmah.ErrorPageBase.get_ErrorLog() +32 
    Elmah.ErrorLogPage.OnLoad(EventArgs e) +313 
    System.Web.UI.Control.LoadRecursive() +97 
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,  Boolean 

Я попытался обновить соответствующие пакеты Azure через nuget, но все еще получаю это исключение.

ответ

1

Если вы установили последний CloudConfigurationManager из nuget, у вас, вероятно, будет установлен 3.1.0. Я щелкнул ссылку на плагин выше, он говорит, что есть обновление, которое использует 3.1.0, поэтому обновление плагина, скорее всего, исправит вашу проблему. Кроме того, проверьте, есть ли у вас переназначение переназначения переназначения в файле конфигурации или добавьте его для ссылки на версию установленного вами CloudConfigurationManager.