<?xml version="1.0"?>
<configuration>
  <configSections>
    <sectionGroup name="WebFoundations">
      <section name="Remoting" type="WebFoundations.Remoting.RemotingSection,WebFoundations.Remoting"/>
      <!-- ESTA SECAO SO E NECESSARIA NO SERVER -->
      <section name="RemotingAssemblies" type="WebFoundations.RemotingService.RemotingAssembliesSection,WFRemotingService"/>
    </sectionGroup>
  </configSections>
  <WebFoundations>
    <Remoting ServerName="localhost" Channel="tcp" Port="8088" ServiceName="ZuriRemoting"/>
    <RemotingAssemblies>
      <RemotingAssembly Name="WebFoundations.DataAccess" ClassName="WebFoundations.DataAccess.DataAccessProxy"/>
      <RemotingAssembly Name="WebFoundations.DataMapper" ClassName="WebFoundations.DataMapper.Adapter.NHibernateProxy"/>
      <RemotingAssembly Name="WebFoundations.Data" ClassName="WebFoundations.Data.ORMEngine.ORMProxy"/>
      <RemotingAssembly Name="WebFoundations.Data" ClassName="WebFoundations.Data.DAEngine.DataAccessProxy"/>
    </RemotingAssemblies>
  </WebFoundations>
  <connectionStrings>
    <clear />
    <add name="ConnectionString" connectionString="server=[server];database=[database];uid=[user];pwd=[password]" providerName="SQLServer" />
  </connectionStrings>
  <appSettings>
    <add key="Zuri.Remoting.ServiceName" value="ZURIREMOTING"/>
  </appSettings>
  <system.web>
    <healthMonitoring heartbeatInterval="0" enabled="true">
      <profiles>
        <clear />
        <add name="Default" minInstances="1" maxLimit="Infinite" minInterval="00:00:00" custom="" />
      </profiles>
      <bufferModes>
        <clear />
        <add name="LogFileBuffer"   maxBufferSize="50"  maxFlushSize="10" urgentFlushThreshold="1"  regularFlushInterval="00:10:00" urgentFlushInterval="00:01:00" maxBufferThreads="1" />
      </bufferModes>
      <providers>
        <clear />
        <add name="LogFileProvider"       type="WebFoundations.Monitoring.EventProviders.FileLog,WebFoundations.Monitoring.EventProviders"        buffer="true"   bufferMode="LogFileBuffer" LogPath="[SERVICEFOLDERPATH]\_Logs\" />
        <add name="AuditLogFileProvider"  type="WebFoundations.Monitoring.EventProviders.FileLog,WebFoundations.Monitoring.EventProviders"        buffer="true"   bufferMode="LogFileBuffer" LogPath="[SERVICEFOLDERPATH]\_Logs\Audit\" />
        <add name="TraceLogFileProvider"  type="WebFoundations.Monitoring.EventProviders.SimpleFileLog,WebFoundations.Monitoring.EventProviders"  buffer="true"   bufferMode="LogFileBuffer" LogPath="[SERVICEFOLDERPATH]\_Logs\Trace\" />
        <add name="DataBaseProvider"      type="WebFoundations.Monitoring.EventProviders.DataBase,WebFoundations.Monitoring.EventProviders"       buffer="false"  ConnectionStringName="WFFramework" />
        <add name="AuditDataBaseProvider" type="WebFoundations.Monitoring.EventProviders.AuditDataBase,WebFoundations.Monitoring.EventProviders"  buffer="false"  ConnectionStringName="WFFramework" />
        <add name="EventLogProvider"      type="System.Web.Management.EventLogWebEventProvider" />
      </providers>
      <eventMappings>
        <clear />
        <add name="Audit"             type="WebFoundations.Monitoring.AuditEvent,WebFoundations.Monitoring" />
        <add name="Warning"           type="WebFoundations.Monitoring.WarningEvent,WebFoundations.Monitoring" />
        <add name="CriticalError"     type="WebFoundations.Monitoring.CriticalError,WebFoundations.Monitoring" />
        <add name="NonCriticalError"  type="WebFoundations.Monitoring.NonCriticalError,WebFoundations.Monitoring" />
        <add name="Performance"       type="WebFoundations.Monitoring.PerformanceMonitor,WebFoundations.Monitoring" />
        <add name="DataAccessError"   type="WebFoundations.Monitoring.DataAccessError,WebFoundations.Monitoring" />
        <add name="Information"       type="WebFoundations.Monitoring.InformationEvent,WebFoundations.Monitoring" />
        <add name="Trace"             type="WebFoundations.Monitoring.TraceEvent,WebFoundations.Monitoring" />
        <add name="GeneralError"      type="WebFoundations.Monitoring.GeneralError,WebFoundations.Monitoring" />
      </eventMappings>
      <rules>
        <clear />
        <add name="CRITICAL_DB"     eventName="CriticalError"     provider="DataBaseProvider"       profile="Default" />
        <add name="NCRITICAL_DB"    eventName="NonCriticalError"  provider="DataBaseProvider"       profile="Default" />
        <add name="DATABASE_DB"     eventName="DataAccessError"   provider="DataBaseProvider"       profile="Default" />
        <add name="WARNING_DB"      eventName="Warning"           provider="DataBaseProvider"       profile="Default" />
        <add name="GENERAL_DB"      eventName="GeneralError"      provider="DataBaseProvider"       profile="Default" />
        <add name="AUDIT_DB"        eventName="Audit"             provider="AuditDataBaseProvider"  profile="Default" />
        <add name="CRITICAL_FILE"   eventName="CriticalError"     provider="LogFileProvider"        profile="Default"/>
        <add name="NCRITICAL_FILE"  eventName="CriticalError"     provider="LogFileProvider"        profile="Default"/>
        <add name="DATABASE_FILE"   eventName="DataAccessError"   provider="LogFileProvider"        profile="Default" />
        <!--
        #### ATIVA O TRACE PARA ANALISE DE EXECUCAO DOS SERVICOS ####
        <add name="TRACE_FILE"    eventName="Trace"             provider="TraceLogFileProvider"   profile="Default" />
        <add name="PERF_FILE"     eventName="Performance"       provider="TraceLogFileProvider"   profile="Default" />
        <add name="INFO_FILE"     eventName="Information"       provider="TraceLogFileProvider"   profile="Default" />
        -->
      </rules>
    </healthMonitoring>
    <globalization culture="pt-BR" uiCulture="pt-BR" />
  </system.web>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
  </startup>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
