我试图使用Elmah plugin for Azure Table Storage,但是这个被抛出了。
[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
我尝试通过nuget更新相关的Azure软件包,但仍然遇到此异常。
答案 0 :(得分:1)
如果您已从nuget安装了最新的CloudConfigurationManager,则可能已安装3.1.0。我点击了上面插件的链接,它说有一个使用3.1.0的更新,所以升级插件可能会解决你的问题。或者,检查配置文件中是否有过期绑定重定向,或添加一个以引用已安装的CloudConfigurationManager版本。