<?xml version="1.0"?>
<!--       
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config
	--> 
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <configSections>
	<!-- Core application-->
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>	
	<section name="pingsession" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <section name="quartz" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
	<section name="filemanager" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
	<section name="ckeditor" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />	
	<section name="languagemanager" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
	<section name="resizer" type="ImageResizer.ResizerSection" requirePermission="false" />
	<section name="AuthenticationUtilities" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
	<section name="NetServiceDebug" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
	<!-- Cms application -->
	<section name="news" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
	<section name="bandi" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <section name="rassegna" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <section name="imagegallery" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />    
	<!-- Vertical application -->
	<section name="customcontacts" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <section name="newsletter" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
	<section name="provvedimenti" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />	
	<section name="pubblicita-appalti" type="System.Configuration.NameValueFileSectionHandler,System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />	
  </configSections>
  <!-- Core application-->
  <log4net debug="false">
    <appender name="rollingFile" type="log4net.Appender.RollingFileAppender,log4net">      
      <File value="{#**AbsoluteLogsFolderPath**#}\cms3"/>
      <AppendToFile value="true"/>
      <ImmediateFlush value="true"/>
      <LockingModel type="log4net.Appender.FileAppender+MinimalLock"/>
      <RollingStyle value="Composite"/>
      <DatePattern value="-yyyy-MM-dd'.log'"/>                         
      <maxSizeRollBackups value="-1"/>
      <maximumFileSize value="200MB" />
      <CountDirection value="1"/>
      <staticLogFileName value="true"/>
      <layout type="NetCms.Diagnostics.Log4Net.LogEntry">
        <locationInfo value="true"/>
      </layout>
    </appender>       
    <root>
      <level value="WARN"/>
      <appender-ref ref="rollingFile"/>
    </root>    
	<!-- This overcomes the proxy narrow log of hibernate -->
    <logger name="NHibernate.Engine.StatefulPersistenceContext.ProxyWarnLog">
      <level value="ERROR" />
    </logger>
  </log4net>
  <pingsession>
    <add key="timeoutping" value="10000"/>
    <!--valore in millisecondi-->
    <add key="basedOnSessionTimeout" value="true"/>
    <!--Dipende dal timeout della sessione-->
  </pingsession>
  <quartz>
    <add key="quartz.scheduler.instanceName" value="QuartzTestLog4Net"/>
    <add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz"/>
    <add key="quartz.threadPool.threadCount" value="10"/>
    <add key="quartz.threadPool.threadPriority" value="2"/>
    <add key="quartz.jobStore.misfireThreshold" value="60000"/>
    <add key="quartz.jobStore.type" value="Quartz.Simpl.RAMJobStore, Quartz"/>
  </quartz>
  <filemanager>
    <add key="width" value="550" />
    <add key="height" value="400" />
    <add key="title" value="false" />
    <add key="rpp" value="15" /> 
    <add key="imgextensions" value="jpg,png,gif" />
    <add key="flashextensions" value="flv,swf" />
    <add key="videoextensions" value="avi,mp4,3gp" />
  </filemanager>
  <ckeditor>
    <add key="ToolbarConfigurations" value="default,basic,forum,normal,full" />
    <add key="width" value="900" />
    <add key="height" value="660" />
  </ckeditor>
  <languagemanager>
	<!-- defaultLanguage se valorizzata a 'db' forza la lettura del linguaggio di default dal db. Se invece viene inserito un'altro valore (qualunque), il linguaggio di default viene letto dal Browser.-->
	<add key="defaultLanguage" value="db" />
	<!-- language number indica dopo quante lingue 'abilitate' verrà effettuato lo switch grafico del WebControl.
	Ovvero: nel caso di '2', se si avranno PIU' di due lingue il controllo verrà visualizzato in stile dropdownList con icona della bandiera e culture code.    
	Altrimenti verranno visualizzate solo le bandiere delle lingue abilitate.-->
	<add key="languageNumber" value="2"/>
  </languagemanager>
  <resizer>
    <diagnostics enableFor="Localhost" />
    <plugins>
      <add name="DiskCache" />
      <add name="Presets" />
    </plugins>
    <diskCache dir="repository/imagecache" autoClean="false" hashModifiedDate="true" enabled="true" subfolders="32" cacheAccessTimeout="15000" />
    <presets onlyAllowPresets="false">
		<preset name="thumb" settings="width=160;height=120;mode=crop"/>
		<preset name="preview" settings="width=640;height=480;mode=crop"/>
		<preset name="tplthumb" settings="width=80;height=60;mode=crop"/>
		<preset name="netimagepickerthumb" settings="width=220;height=100;mode=crop"/>			
		<preset name="newsmodulothumb" settings="width=80;height=60;mode=crop"/>
		<preset name="newsthumb" settings="width=80;height=60;mode=crop"/>
		<preset name="newsdetail" settings="width=280;height=140;mode=crop"/>
    </presets>
  </resizer>
  <AuthenticationUtilities>
		<add key="EncryptionKey" value="MAKV2SPBNI99212"/>
  </AuthenticationUtilities>
  <NetServiceDebug>
    <add key="enableDebugLogin" value="true"/>
    <add key="enableGenericDebug" value="true"/>
    <add key="enableRawExceptions" value="true"/>
    <add key="enableSqlExceptions" value="false"/>
    <add key="frontTimingsEnabled" value="false"/>
    <add key="applicationsInstallationEnabled" value="true"/>
  </NetServiceDebug> 
   <!-- End Core application-->
  <!-- Cms application -->  
  <news>
    <add key="ArchivioStorico" value="false"/><!-- true/false -->
    <add key="DataPubblicazione" value="false"/><!-- true/false -->
    <add key="DataScadenza" value="false"/><!-- true/false -->
  </news>
  <bandi>
    <add key="AppRepository" value="repository"/>
    <add key="TmpFolderUploadPath" value="repository/bandi/tmp"/>
    <add key="UploaderHandler" value="charts/uploader.ashx"/>
  </bandi>
  <rassegna>
    <add key="AppRepository" value="repository"/>
    <add key="TmpFolderUploadPath" value="repository/rassegna/tmp"/>
    <add key="UploaderHandler" value="charts/uploader.ashx"/>
  </rassegna>
  <imagegallery>
    <add key="AppRepository" value="repository"/>
    <add key="TmpFolderUploadPath" value="imagegallery/tmp"/>
    <add key="UploaderHandler" value="charts/uploader.ashx"/>
    <add key="UseAshxHandler" value="true"/>
    <!-- Indica al sistema se usare l'handler ashx per eseguire il resize (si applica in modalità app pool classica) -->
    <add key="ThumbPreset" value="thumb"/>
    <add key="PreviewPreset" value="preview"/>
  </imagegallery>
  <!-- End Cms application -->
  <!-- Vertical application -->  
  <customcontacts>
    <add key="mailtargets" value="{#**PortalEmail**#}" />
    <add key="mailsubject" value="Richiesta informazioni/contatto" />
  </customcontacts> 
  <newsletter>
    <add key="AppStatus" value="on" /> <!-- ????? -->
    <add key="AppRepositoryPath" value="repository/newsletter" />
    <add key="AppTemplatePath" value="repository/newsletter/templates" />
    <add key="EmailPath" value="repository/newsletter/emails" />
    <add key="Multichannel" value="on" />
    <add key="Rubrica" value="on" />
    <add key="Liste" value="on" />
    <add key="Guest" value="on" />
    <add key="CmsUser" value="on" />
    <add key="UrlAttivazione" value="newsletter/conferma.aspx" />
    <add key="UrlModificaProfilo" value="newsletter/profilo.aspx" />
    <add key="UrlRimozione" value="newsletter/rimuovi.aspx" />
    <add key="UrlRimozioneRubrica" value="newsletter/rimuovirubrica.aspx" />
    <add key="UrlModificaCms" value="newsletter/profilocms.aspx" />
    <add key="UrlRimozioneCms" value="newsletter/rimuovicms.aspx" />
  </newsletter>
  <provvedimenti>
    <add key="ApplicationPath" value="" />
    <add key="AppRepository" value="repository" />
    <add key="TmpFolderUploadPath" value="repository/provvedimenti/tmp" />
    <add key="DocumentsFolder" value="repository/provvedimenti/allegati" />
    <add key="ImportsFolder" value="repository/provvedimenti/atti_imports" />
    <add key="ExportsFolder" value="repository/provvedimenti/provv_exports" />
    <add key="UploaderHandler" value="charts/uploader.ashx" />
    <add key="ShowAttachAfterDate" value="false" /><!--Non usata-->
    <add key="FilterDocsByUser" value="false" /><!-- true/false --><!--Non usata-->
	<add key="EnableControlloGruppi" value="false" /><!-- Abilita la gestione dei provvedimenti da gruppi associati a soggetti emittenti-->
  </provvedimenti>  
  <pubblicita-appalti>
    <add key="ApplicationPath" value="" />
    <add key="AppRepository" value="repository" />
    <add key="ExportsFolder" value="repository/pubblicitaappalti/advertisings_exports" />
    <add key="TmpFolderUploadPath" value="repository/pubblicitaappalti/tmp" />
    <add key="ImportsFolder" value="repository/pubblicitaappalti/appalti_imports" />
    <add key="UploaderHandler" value="charts/uploader.ashx" />
    <add key="DocumentsFolder" value="repository/pubblicitaappalti/allegati" />
	<add key="EnableFix" value="0" />
    <add key="ArColumnMaxOperatorsNumber" value="6" />
	<add key="EnableControlloGruppi" value="false" /><!-- Abilita la gestione dei provvedimenti da gruppi associati a soggetti emittenti-->
  </pubblicita-appalti>
  <location path="." inheritInChildApplications="false">
  <appSettings>
	<add key="NhConfigFileValid" value="false" />
    <!-- Impostazioni orari di disponibilità del servizio di creazione dei portali-->
    <add key="NetworksCreationAvailabilityStartTime" value="11"/>
    <add key="NetworksCreationAvailabilityEndTime" value="10"/>
    <!-- Trace Settings-->
    <add key="logWriter" value="log4net"/>
    <add key="log4netVerbosityLevels" value="5"/>
    <add key="LogFolderPath" value="{#**AbsoluteLogsFolderPath**#}"/>
    <!-- Email Settings-->
    <add key="SmtpHost" value="{#**SmtpHost**#}"/>
    <add key="SmtpPort" value="{#**SmtpPort**#}"/>
    <add key="SmtpUser" value="{#**SmtpUser**#}"/>
    <add key="SmtpPassword" value="{#**SmtpPw**#}"/>
    <add key="EnableSsl" value="{#**SmtpSsl**#}"/>
    <add key="EmailToReport" value="{#**PortalEmail**#}"/>
    <!--per liste di email usare ; come separatore -->
    <add key="EmailFrom" value="{#**PortalEmail**#}"/>   
	<add key="DisableServerCertificateValidation" value="false"/>	
    <!-- CMS Settings-->
    <add key="SiteManagerRoot" value="cms"/>
    <add key="RootPath" value="{#**PortalRootPath**#}"/>
    <add key="NetworkVersion" value="2"/>
	<add key="UseDefaultNetwork" value="true" />
    <add key="PasswordCripted" value="false"/>
    <add key="SiteManagerBackAccountSessionKey" value="SiteManagerBackAccountSessionKey"/>
    <add key="BackAccountTokenID" value="SiteManagerCommonAccountToken"/>
    <add key="FrontAccountTokenID" value="FrontCommonAccountToken"/>
    <add key="SystemFolders" value="contact,user,services,ricerca,registrazione,charts,app_code,ajax,app_images,css,img,scripts,bin"/>
    <add key="SystemFiles" value="grants.aspx,rss.xml,login.aspx,error.aspx,error404.aspx,details.aspx,navigate.aspx"/>
    <add key="ClearPagesFiles" value="ajaxfolder.aspx,ajaxfolderpopup.aspx,info.aspx,upload.aspx"/>
    <add key="DataServiceTYPE" value="database"/>
    <add key="LoginProtocol" value="http"/>
    <add key="VfLabelsPath" value="{#**AbsoluteCMSFolderPath**#}\configs\labels_apps.xml"/>
    <add key="HttpsHandlerClass" value="NetCms.Handlers.HttpsHandler_Off"/><!-- http/https-->    
    <add key="ChartImageHandler" value="storage=file;timeout=20;"/>
    <add key="UploadFileSizeLimit" value="200000"/>
    <!-- Indicare il limite di dimensione per i file in migliaia 1M = 1000 -->
    <!-- 
    Le chiavi sottostanti devono essere rimosse in esercizio
    Valori:  
    off = valore per consegna cliente
    on = Attiva il combo box per le login
    advanced =  Attiva il combo box per le login e mostra i dati sulle query eseguite
    -->  
    <add key="EnableNetServiceDebug" value="advanced"/>
    <add key="LabelsPath" value="{#**AbsoluteCMSFolderPath**#}\configs\labels"/>    
    <!-- Settare a uno se si vogliono gestire le richieste di registrazione -->
    <add key="ManageRegRequests" value="0" />
	<add key="UniqueMailAddress" value="0" />
    <add key="BackOfficeSkinPath" value="/cms/css/admin/" />
	<add key="BreadCrumStartLabel" value="Home" />
	<add key="NotifyEnabled" value="false" />
	<add key="PortalFakeDomain" value="" /> <!-- indirizzo fittizio per forzare la sostituazione del dominio ufficiale negli indirizzi che puntano allo stesso portale -->
	<add key="ActivationViaSMS" value="0"/>
  </appSettings>
  </location>
  <connectionStrings>
    <add name="LogErrorDB" connectionString="server={#**DbHost**#};database=cms3_logs;user id={#**DbUser**#};password={#**DbPw**#}" providerName="MySql.Data.MySqlClient"/>
    <add name="ConnectionString" connectionString="server={#**DbHost**#};database={#**DbName**#};user id={#**DbUser**#};password={#**DbPw**#};charset=utf8;port={#**DbPort**#}" providerName="MySql.Data.MySqlClient"/>
    <add name="CmsFluentDB" connectionString="server={#**DbHost**#};database={#**DbName**#};user id={#**DbUser**#};password={#**DbPw**#};charset=utf8;port={#**DbPort**#}" providerName="MySql.Data.MySqlClient"/>
  </connectionStrings>
  <location path="." inheritInChildApplications="false">
  <system.web>
    <pages maintainScrollPositionOnPostBack="true" validateRequest="false"></pages>
    <httpRuntime enableVersionHeader="false" maxRequestLength="110264" requestValidationMode="2.0" executionTimeout="1800" />
    <globalization requestEncoding="UTF-8" responseEncoding="UTF-8" culture="it-IT"/>
    <customErrors mode="Off"/>
    <httpHandlers>      
      <add verb="*" path="*/export-table-data/*.pdf" type="NetCms.Handlers.DatatableConvertHandler" />	  
	  <add verb="*" path="*/export-table-data/*.csv" type="NetCms.Handlers.DatatableConvertHandler" />	              
	  <add verb="*" path="*.aspx" type="NetCms.Handlers.NetworkHandler"/>
	  <add verb="GET" path="newsletter.news" type="StatsImage"/>	
      <add verb="*" path="*.cap" type="ImageCaptcha"/>      
      <add verb="*" path="*/plupload_handler.ashx" type="NetUpload.UploadHandler"/>
      <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler,System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    </httpHandlers>
    <!--  
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
    <!--  
            use the trace block to dysplay additional information from the system when in realease mode.
        -->
    <!--!<trace enabled="true" pageOutput="false" writeToDiagnosticsTrace ="true" />-->
    <compilation debug="true" defaultLanguage="c#" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Web.DataVisualization.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </assemblies>
    </compilation>
    <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
    <authentication mode="Windows"/>
    <!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    <xhtmlConformance mode="Strict"/>
    <httpModules>    
      <add name="CMSSessionModule" type="NetCms.DBSessionProvider.FluentSessionModule"/>
	  <add name="ImageResizingModule" type="ImageResizer.InterceptModule" />
	  <remove name="WindowsAuthentication" />
      <remove name="PassportAuthentication" />
      <remove name="AnonymousIdentification" />
      <remove name="UrlAuthorization" />
      <remove name="FileAuthorization" />
    </httpModules>
  </system.web>
  </location>
  <!-- binding per webservice clickatell -->
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="PushServerWSBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
            <message clientCredentialType="UserName" algorithmSuite="Default"/>
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://api.clickatell.com/soap/webservice.php" binding="basicHttpBinding" bindingConfiguration="PushServerWSBinding" contract="PushServerWSPortType" name="PushServerWSPort"/>
    </client>
  </system.serviceModel>
  <system.webServer>
        <directoryBrowse enabled="false" />
		<handlers>                   
			<add name="MappingPDF" path="*/export-table-data/*.pdf" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />        
			<add name="MappingCSV" path="*/export-table-data/*.csv" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />        
        </handlers>
        <defaultDocument>
            <files>
                <clear />
                <add value="default.aspx" />
            </files>
        </defaultDocument>
		<staticContent>            
            <mimeMap fileExtension=".odt" mimeType="application/vnd.oasis.opendocument.text" />
            <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />			
        </staticContent>
		<httpProtocol>
            <customHeaders>
                <remove name="X-Powered-By" />
            </customHeaders>
        </httpProtocol>
		
		<urlCompression doStaticCompression="true" doDynamicCompression="true" />
   </system.webServer>
</configuration>