- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我使用 SQL Azure 作为使用企业库 5 的日志存储库。我正在使用 azure 的所有部署连接字符串和数据库连接字符串从自己的计算机运行完整的集成测试,并尝试将日志写入数据库。这很好用!
但是当实际部署在登台环境中并尝试写入日志时,没有抛出异常,但也没有写入日志。
这是我的 app.config 相关部分:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
</configSections>
<loggingConfiguration name="" tracingEnabled="true" defaultCategory="MainLogger"
revertImpersonation="false">
<listeners>
<add name="LoggingDb" type="Microsoft.Practices.EnterpriseLibrary.Logging.Database.FormattedDatabaseTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging.Database, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Database.Configuration.FormattedDatabaseTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging.Database, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
databaseInstanceName="LoggingDb" writeLogStoredProcName="WriteLog"
addCategoryStoredProcName="AddCategory" traceOutputOptions="DateTime, Timestamp, ProcessId, ThreadId, Callstack" />
</listeners>
<formatters>
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
template="Timestamp: {timestamp}{newline}
Message: {message}{newline}
Category: {category}{newline}
Priority: {priority}{newline}
EventId: {eventid}{newline}
Severity: {severity}{newline}
Title:{title}{newline}
Machine: {localMachine}{newline}
App Domain: {localAppDomain}{newline}
ProcessId: {localProcessId}{newline}
Process Name: {localProcessName}{newline}
Thread Name: {threadName}{newline}
Win32 ThreadId:{win32ThreadId}{newline}
Extended Properties: {dictionary({key} - {value}{newline})}"
name="Text Formatter" />
</formatters>
<categorySources>
<add switchValue="All" name="MainLogger">
<listeners>
<add name="LoggingDb" />
</listeners>
</add>
</categorySources>
<specialSources>
<allEvents switchValue="All" name="All Events">
<listeners>
<add name="LoggingDb" />
</listeners>
</allEvents>
<notProcessed switchValue="All" name="Unprocessed Category">
<listeners>
<add name="LoggingDb" />
</listeners>
</notProcessed>
<errors switchValue="All" name="Logging Errors & Warnings">
<listeners>
<add name="LoggingDb" />
</listeners>
</errors>
</specialSources>
</loggingConfiguration>
<dataConfiguration defaultDatabase="LoggingDb" />
<connectionStrings>
<add name="LoggingDb" connectionString="Server=tcp:********.database.windows.net,1433;Database=****.Logging;User ID=*******@*******;Password=**********;Trusted_Connection=False;Encrypt=True;" providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
我收到以下异常:
配置“listenerDataType=”Microsoft.Practices.EnterpriseLibrary.Logging.Database.Configuration.FormattedDatabaseTraceListenerData、Microsoft.Practices.EnterpriseLibrary.Logging.Database、Version=5.0.414.0、Culture=neutral、PublicKeyToken=31bf3856ad364e35”中的无效 TraceListenerData 类型'。 (E:\sitesroot\0\web.config 第 30 行)
在开发中它可以工作......对此有什么想法或经验吗?
问候,
詹姆斯
最佳答案
是的,正如所评论的,以下是必须位于您的服务目录中的 dll,以便日志记录 block 能够运行:
Microsoft.Practices.Unity.dll
Microsoft.Practices.ServiceLocation.dll
Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll
Microsoft.Practices.EnterpriseLibrary.Logging.dll
Microsoft.Practices.EnterpriseLibrary.Common.dll
关于azure - 使用 Enterprise Library 5 登录到 SQL Azure 可以从开发计算机工作,但不能从 Web 角色工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9781405/
我看过有关 CocoaPods 的指南,建议像这样导入所需的 pod 的库 header : #import 在哪里Library是库的名称(例如 #import )。 我还看到指南建议像这样导入
我正在尝试创建一个包含其他库的 PHP 库,我敢打赌我遗漏了一些基本的东西。 使用 AWS PHP SDK作为指南,我想创建一个库,在使用 Composer 安装后,它需要其他库,但是类的整个范围(包
我正在为 Android 产品开发我的 gradle 版本,以使产品风格正常工作。 我有以下项目结构: at.mkw.inlocs.android - Library Project at.mkw.i
使用@testing-library/react-hooks 我过去常常通过initialProps 传递模拟存储,正如Advanced Hooks 中提到的那样文档。假设我有一个代码: import
我试图获得一个静态链接到我的程序的音频库。我用 this灵活的包。为了让它运行,我必须按照描述构建 soloud 库 here .下载后不久,我在“build”文件夹中运行了“genie --with
我刚刚安装了 zkcm library在我的 kubuntu 机器上,我在编译 C++ 代码时遇到了问题。 我已经安装了 gmp 和 mpfr 库并检查它们是否工作;代码 mpfr_t m1, m2,
我正在尝试编译我的 native 代码。这是我的 android.mk 文件 //part1-static lib LOCAL_PATH := $(call my-dir) include $(CLE
我正在开发一个带有沙丘的大型图书馆。让我们调用这个库L . 为了避免造成大困惑,沙丘项目有许多较小的库:A , B , C , ... 这些库相互依赖。 我希望用户能够 opam install L
在 unix 之上使用 C 语言工作,我正在加载和使用共享库,如下所示: ... handle = dlopen("nameOfLib"); ... libInit(); ... libGoToSta
我试图找出一种更简单的方法来为XCode中的链接器构建阶段复制/同步框架列表。我知道我可以在Xcode中复制目标,但这是用于创建新的Cocoa Touch Unit Testing Bundle目标。
例如/lib/的描述是它包含系统的共享库文件。 图书馆到底是什么?我们谈论的库文件是否类似于在 C 中导入库?库文件中包含什么以及它们的用途是什么? 它与.dll 有什么关系 最佳答案 库只是一个代码
我有这样的目录结构 . --compile_c.sh --compile_java.sh --config.sh --execute_java.sh --run.sh --src --ccode
我正在更新一些 Makefile 以从 Make 3.81 移动到 3.82。在多个地方,原作者使用了类似这样的东西来构建静态库: all: lib$(library).a($objects) 这似乎
我是 Rust 的新手,正在尝试了解 Cargo 的东西。我在他们的常见问题解答中读到关于 "why do binaries have Cargo.lock in version control, b
我正在尝试使用 Microsoft Enterprise Library 中的 DatabaseFactory 方法。 using Microsoft.Practices.EnterpriseLibr
我刚刚升级到Xcode 5.1,突然出现一个新警告: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctool
然后新的Enterprise Library 6出来了,可以是downloaded here .我已将 EnterpriseLibrary6-binaries.exe 下载并解压缩到我的 C: 驱动器
我正在尝试将 native 库与我的 Eclipse 插件捆绑在一起。当我提供库的路径时 -Djava.library.path ,它完美无缺。 但是,当我将它添加到 MANIFEST.MF 中时文件
在我的 Android Studio 项目中,我有两个子项目/模块:一个 Android 应用程序(App1)和一个 Android 库项目(LibraryProject1)。 App1取决于 Lib
我最近使用 Google 的 Closure 编译器创建了一个 JavaScript 库:https://github.com/bvaughn/task-runner 我打算让这个库供那些也需要完整闭
我是一名优秀的程序员,十分优秀!