问题标签 [enterprise-library-6]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
visual-studio-2013 - 带有 Visual Studio 2013 的 Enterprise Library 6 中的配置工具/控制台引发 FileNotFoundException
我正在试验 EntLib6 和 Visual Studio 2013。
当我尝试使用 EntLibConfig.exe 或 EntLibConfig-32.exe 打开 web.config 时,出现以下异常:
我在这里尝试使用示例 - http://code.msdn.microsoft.com/Use-Jquery-Autocomplete-a2e3e42e#content (使用 Jquery Autocomplete With Web Service (ASMX) DataSource)
我的机器是 Windows 7 64 位,VS2013 Update 2。它指的是哪个文件,我该如何克服这个错误?
c# - 我可以更改 Enterprise Library Semantic Logging Block 使用的数据库表和存储过程吗
我想向语义日志记录 SQLServerSink 使用的默认数据库添加更多列。
我可以更改 Enterprise Library Semantic Logging Block 使用的数据库表和存储过程吗?
如果是,如何,如果不是,那么替代解决方案是什么..
实际上,有效负载列包含多个属性,我想对这些属性触发 SQL 查询,因此我想将它们存储到单独的列中。如果我们使用 AzureTableStorageSink,它们会自动存储到单独的列中。
enterprise-library-6 - How to store the payload in separate columns using the Semantic Logging Application Block's SqlDatabaseSink
How can the SqlDatabaseSink store the payload in separate columns? It's mentioned in the documentation, but I haven't seen it done anywhere. When I've tried, the payload is always stored as a JSON string. Any ideas?
Source: Developing event sources using the .NET EventSource class
Under "Specifying the event and its payload" it states:
Some sinks will store payload items individually; for example, the SQL Database sink and the Azure Table Storage sink in the Semantic Logging Application Block store each payload item in a separate column.
Is the documentation wrong regarding the SqlDatabaseSink? I've heard DEVs claim that the Azure Sink works.
c# - 企业库 DAAB 6 和 ODP.NET - 默认数据库“XXX”的连接字符串不存在
我正在使用企业库 DAAB 6。为了与 Oracle 数据库通信,我正在使用 EntLib Contrib 库。
我的应用程序的配置文件看起来像
我已经使用 NuGet 安装了所有必需的包。Package.Config 文件如下所示:
我还添加了对Oracle.DataAccess.dll文件的引用。
我使用以下代码行连接到数据库
上面的行生成了一个非常奇怪的错误消息。完整的堆栈跟踪如下:
tnsping适用于 Oracle 数据库。
我已经用谷歌搜索了这个特定的错误消息,但我找不到这个问题的解决方案。我还尝试了 Contrib 源代码提供的 QuickStart 代码示例。它也生成相同的错误消息。
c# - 企业库 6 Microsoft.Practices.EnterpriseLibrary.Caching 丢失?
我在 Enterprise libary 5 中看到了 ICacheManager 并想检查一下。我在 Enterprise library 6 中找不到它。
这是怎么回事?改名了吗?是否因为存在问题而被弃用?
c# - 在配置源中找不到 Logging 的配置部分
我得到以下异常。我正在使用 Enterprise Library 6.0 应用程序日志记录块。
代码库如下。
请告诉我哪里出错了。
c# - 如何在 SqlDataAdapter/DataSet 上应用 ReliableSqlConnection 的重试策略
我们在 Azure Sql 连接和命令上应用了 Microsoft 的企业库瞬态故障处理块。
例如,
它适用于例如command.ExecuteReader()
,这是没有重试策略的原始调用。但是如果代码使用DataSet
and怎么办SqlDataAdapter
:
我们主要在处理一些遗留代码以添加一些重试策略。
c# - 我可以添加新版本的事件方法并使用相同的事件 ID 吗?
关于版本控制,语义日志记录应用程序块的文档建议:
如果确实需要修改 EventSource 类,则应将更改限制为添加方法以支持新的日志消息,以及添加现有方法的重载(这将具有新的事件 ID)。您不应删除或更改现有方法的签名。
假设我有以下 EventSource 类:
然后我想添加对记录查询字符串的支持。我可以添加具有相同 ID 的重载方法吗?
如何在对应用程序或进程外主机日志记录应用程序影响最小的情况下支持未来的修改?
我可以通过在模型类中进行添加来简化签名吗?
和
我不太确定 Event ID 适合这一切的位置,以及EventSource
类的维护需要多少注意这一点。
enterprise-library - Enterprise Library 6.0 与 GetStoredProcCommand 的数据访问问题
我正在尝试使用 Enterprise Library 6.0 数据块构建数据访问层。下面是我的配置文件
下面是我的类文件
但我们收到错误“ExecuteNonQuery:连接属性尚未初始化。” 在 cmd.ExecuteNonQuery() 如果我们用 db.ExecuteNonQuery(cmd) 替换 cmd.ExecuteNonQuery() 那么它就可以工作。
那么为什么它首先失败了,什么是处理这个问题的好方法呢?
c# - Unity v3 - RegistrationByConvention - 无法加载类型异常
我正在使用 Enterprise Library 6 和 Unity v.3.5.0.0
出现以下错误:
无法从程序集“Microsoft.Practices.EnterpriseLibrary.Common,版本=6.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”加载类型“Microsoft.Practices.EnterpriseLibrary.Common.Configuration.Manageability.ConfigurationSectionManageabilityProviderAttribute”。
当使用此代码通过使用一组规则和约定(通过约定注册)向容器自动注册多种类型时
更新:
类型:
Microsoft.Practices.EnterpriseLibrary.Common.Configuration.Manageability.ConfigurationSectionManageabilityProviderAttribute
不再是 EntLib 6 的一部分,而是在 Entlib 5 中。
堆栈跟踪:
[TypeLoadException:无法从程序集“Microsoft.Practices.EnterpriseLibrary.Common,版本=6.0.0.0,文化=中性,PublicKeyToken=31bf3856ad364e35”中加载类型“Microsoft.Practices.EnterpriseLibrary.Common.Configuration.Manageability.ConfigurationSectionManageabilityProviderAttribute”。]
系统.ModuleHandle.ResolveType(RuntimeModule 模块, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) +0
System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] type[] RuntimeTypeHandle[] typeInstantiationHandle方法实例化上下文)+145
System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) +162
System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) +87
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +438 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +103
System.Reflection .RuntimeAssembly.GetCustomAttributes(Type attributeType, Boolean inherit) +64
System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit) +87
System.Attribute.GetCustomAttribute(Assembly element, Type attributeType, Boolean inherit) +13
System.Reflection .CustomAttributeExtensions.GetCustomAttribute(装配元素)+57
Microsoft.Practices.Unity.AllClasses.IsSystemAssembly(Assembly a) +78 Microsoft.Practices.Unity.<>c__DisplayClass10.b__f(Assembly a) +72 System.Linq.WhereArrayIterator 2.MoveNext() +168 System.Linq.WhereEnumerableIterator 1类型,Func 2 getName,Func 2 getInjectionMembers,布尔覆盖 ExistingMappings)+13231.MoveNext() +48
System.Linq.<SelectManyIterator>d__141.MoveNext() +152
Microsoft.Practices.Unity.UnityContainerRegistrationByConventionExtensions.RegisterTypes(IUnityContainer container, IEnumerable2 getFromTypes, Func
2 getLifetimeManager, Func