ウェブロールから文字列と紺色のDB接続文字列を取得し、DBにログを書き込もうとします。 これは問題なく動作します。ログのdevのコンピュータからの作品ではなく、私はすべてのデプロイメント接続を使用して自分のコンピュータから完全に統合テストを実行しています、エンタープライズライブラリ5. を使用して、私のログリポジトリとしてSQL Azureのを使用しています
しかしacctuallyステージングenviormentに展開し、ログへの書き込みしようとすると、例外がスローされないが、何のログはどちらか書かれていません。
<?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>
そして、私は次の例外受け取る:構成で
無効TraceListenerDataタイプ「をlistenerDataType = "Microsoft.Practices.EnterpriseLibrary.Logging.Databaseここ
は私のapp.config関連するセクションです。 Configuration.FormattedDatabaseTraceListenerData、Microsoft.Practices.EnterpriseLibrary.Logging.Database、バージョン= 5.0.414.0、カルチャニュートラル、PublicKeyToken = = 31bf3856ad364e35" 」。 (E:¥sitesroot¥0¥web.config 30行目)
Devで動作している間に... このアイデアや経験は何ですか?
よろしく、
ジェームズ
Microsoft.Practices.EnterpriseLibrary.Logging.Database.dllがステージングに展開されていることを確認します。それがそのエラーの典型的な原因です。 –