<?xml version="1.0" encoding="UTF-8"?>
<!-- 
	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>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <probing privatePath="bin;bin\Components" />
    </assemblyBinding>
  </runtime>
  <system.web>
    <trust level="Full" originUrl="" />
    <!--
			The <authentication> section enables configuration 
			of the security authentication mode used by 
			ASP.NET to identify an incoming user. 
		-->
    <authentication mode="None" />
    <!--
			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="Off" defaultRedirect="GenericErrorPage.htm">
      <error statusCode="403" redirect="NoAccess.htm" />
      <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    <httpHandlers>
      <add verb="*" path="*.lims" type="Starlims.Server.WebServices.HttpHandler.DotLimsHandler, Starlims.Server.WebServices" />
      <add verb="*" path="*.lims2" type="Starlims.Server.WebServices.HttpHandler.DotLimsSessionlessHandler, Starlims.Server.WebServices" />
      <remove verb="*" path="*.config" />
      <add verb="*" path="web.config" type="System.Web.HttpForbiddenHandler" />
    </httpHandlers>
    <httpRuntime maxRequestLength="102400" />
    <sessionState mode="Custom" customProvider="StarlimsSessionProvider" timeout="2">
      <providers>
        <add name="StarlimsSessionProvider" type="Starlims.Server.SessionStateStoreProvider" connectionStringName="Dictionary" monitorTimer="3600" idleSessionTimeout="10080" />
      </providers>
    </sessionState>
  </system.web>
  <appSettings>
    <clear />
    <add key="STARLIMS.AnonymousUser" value="ANONYMOUS" />
    <add key="STARLIMS.AnonymousPass" value="anonymous" />
    <add key="ApplicationBaseFolder" value="#{APP_PATH}##{WEBSITE_NAME}#\bin" />
    <add key="ShadowCacheFolder" value="#{APP_PATH}##{WEBSITE_NAME}#\ShadowCache" />
    <add key="GlobalCacheFolder" value="" />
    <add key="LocalCacheFolder" value="#{APP_PATH}##{WEBSITE_NAME}#\bin\LocalCache" />
    <add key="CompilerOutputFolder" value="#{APP_PATH}##{WEBSITE_NAME}#\CompilerOutput" />
    <add key="GlobalCacheType" value="Database" />
    <add key="FileLogFolder" value="#{APP_PATH}##{WEBSITE_NAME}#\Logs" />
    <add key="UserLogFolder" value="#{APP_PATH}##{WEBSITE_NAME}#\Logs\Users" />
    <add key="Reporting_EnableDebugger" value="false" />
    <add key="Reporting_DebuggerFolder" value="C:\Temp\Ursus\WorkPath\" />
    <add key="Reporting_EnablePerformanceLogger" value="false" />
    <add key="Reporting_PerformanceLoggerFileName" value="PerformanceLog.txt" />
    <add key="Reporting_EnableSetLocation" value="true" />
    <add key="RecycleAppDomains" value="WhenCodeChanges | WhenIdle:30 | WhenInfiniteLoop:30" />
    <add key="UniqueAppDomain" value="false" />
    <add key="DisableClientExceptions" value="false" />
    <add key="CompilerCheckParamType" value="false" />
    <add key="RedirectRequestsToHTTPS" value="false" />
    <add key="WorkPathFolder" value="#{APP_PATH}##{WEBSITE_NAME}#\workpath" />
    <add key="ProductName" value="#{WEBSITE_NAME}#" />
    <add key="HTTPServices" value="RESTServices.*" />
    <add key="CompilerCheckParamType" value="false" />
    <add key="User" value="#{LS_ADMIN_USER}#" />
    <add key="Pass" value="#{LS_ADMIN_PASSWORD}#" />
    <add key="File" value="#{SRV_FILE}#" />
    <add key="UseSequencesForLimsCounters" value="true" />
    <!--default: false-->
    <add key="CompileTimeLogWarnings" value="false" />
  </appSettings>
  <!--  	the name represents the friendly name that will be used inside STARLIMS code : Dictionary, Database etc...;
			the provider name key has on the first position the PLATFORMA name and on the second the connection type ex. native SQL(ORACLE), OleDB, ODBC 
			the connection string is ... THE connection string
	-->
  <connectionStrings>
    <clear />
    <add name="Dictionary" connectionString="Data Source=#{DATABASE_SERVER}#;Initial Catalog=#{DICTIONARY}#;User Id=#{DATABASE_LOGIN_USR}#;Password=#{DATABASE_LOGIN_PSW}#;" providerName="SQL;nativeSQL;keepAlive" />
    <add name="GlobalCacheDatabase" connectionString="Data Source=#{DATABASE_SERVER}#;Initial Catalog=#{DICTIONARY}#;User Id=#{DATABASE_LOGIN_USR}#;Password=#{DATABASE_LOGIN_PSW}#;" providerName="SQL;nativeSQL;keepAlive" />
    <add name="Database" connectionString="Data Source=#{DATABASE_SERVER}#;Initial Catalog=#{DATABASE}#;User Id=#{DATABASE_LOGIN_USR}#;Password=#{DATABASE_LOGIN_PSW}#;" providerName="SQL;nativeSQL;keepAlive;useUTC" />
    <add name="DATAdotNET" connectionString="Data Source=#{DATABASE_SERVER}#;Initial Catalog=#{DATABASE}#;User Id=#{DATABASE_LOGIN_USR}#;Password=#{DATABASE_LOGIN_PSW}#;" providerName="SQL;nativeSQL;keepAlive;useUTC" />
  </connectionStrings>
  <system.diagnostics>
    <switches>
      <clear />
      <!--
			Switches that turn on and off different types of logging. The names should not be changed.
			A value of "1" means turn on, and a value of "0" means turn off.
			
			For file log we have:
			0   Off
			1   Error       only errors
			2   Warning     errors and warnings
			3   Info        errors, warnings and info
			4   Verbose     all messages
	  -->
      <add name="SystemEventLogSwitch" value="1" />
      <add name="FileLogSwitch" value="1" />
      <add name="EmailLogSwitch" value="0" />
    </switches>
  </system.diagnostics>
  <location path="Default Web Site">
    <system.webServer>
      <handlers>
        <remove name="LimsExtension32_2" />
        <remove name="PageHandlerFactory-ISAPI-4.0_64bit" />
        <remove name="LimsExtension64_2" />
        <remove name="LimsExtension32" />
        <remove name="ISAPI-dll" />
        <remove name="LimsExtension64" />
      </handlers>
    </system.webServer>
  </location>
  <system.webServer>
    <handlers>
      <add name="LimsExtension32" path="*.lims" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
      <add name="LimsExtension64" path="*.lims" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
      <add name="LimsExtension32_2" path="*.lims2" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
      <add name="LimsExtension64_2" path="*.lims2" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
    </handlers>
    <staticContent>
      <remove fileExtension=".apk" />
      <mimeMap fileExtension=".apk" mimeType="application/vnd.android.package-archive" />
      <remove fileExtension=".ipa" />
      <mimeMap fileExtension=".ipa" mimeType="application/octet-stream" />
      <remove fileExtension=".plist" />
      <mimeMap fileExtension=".plist" mimeType="text/xml" />
      <remove fileExtension=".woff" />
      <mimeMap fileExtension=".woff" mimeType="application/octet-stream" />
      <remove fileExtension=".woff2" />
      <mimeMap fileExtension=".woff2" mimeType="font/woff2" />
      <remove fileExtension=".manifest" />
      <mimeMap fileExtension=".manifest" mimeType="text/cache-manifest" />
    </staticContent>
  </system.webServer>
</configuration>