<?xml version="1.0" encoding="utf-8" ?>
<settings>
  <content>
    <imaging>
      <!-- what file extension that should cause umbraco to create thumbnails -->
      <imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
      <!-- automatically updates dimension, filesize and extension attributes on upload -->
      <autoFillImageProperties>
        <uploadField alias="umbracoFile">
          <widthFieldAlias>umbracoWidth</widthFieldAlias>
          <heightFieldAlias>umbracoHeight</heightFieldAlias>
          <lengthFieldAlias>umbracoBytes</lengthFieldAlias>
          <extensionFieldAlias>umbracoExtension</extensionFieldAlias>
        </uploadField>
        <uploadField alias="umbracoFile2">
          <widthFieldAlias>umbracoWidth2</widthFieldAlias>
          <heightFieldAlias>umbracoHeight2</heightFieldAlias>
          <lengthFieldAlias>umbracoBytes2</lengthFieldAlias>
          <extensionFieldAlias>umbracoExtension2</extensionFieldAlias>
        </uploadField>
      </autoFillImageProperties>      
    </imaging>
   
    <errors>
      <!-- the id of the page that should be shown if the page is not found -->
      <!--<error404>
                   <errorPage culture="default">1</errorPage>
                   <errorPage culture="en-US">200</errorPage>
            </error404>-->
      <error404>
        <errorPage culture="default">1047</errorPage>
        <errorPage culture="en-US">$site/error [@name = 'error']</errorPage>
        <errorPage culture="en-UK">8560867F-B88F-4C74-A9A4-679D8E5B3BFC</errorPage>
      </error404>
      <!--<error404>1</error404>-->
    </errors>
    <notifications>
      <!-- the email that should be used as from mail when umbraco sends a notification -->
      <email>robot@umbraco.dk</email>
      <disableHtmlEmail>true</disableHtmlEmail>
    </notifications>

    <PreviewBadge>
      <![CDATA[
      <a id="umbracoPreviewBadge" style="z-index:99999; position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{0}/assets/img/preview-mode-badge.png') no-repeat;" href="#" OnClick="javascript:window.top.location.href = '{0}/preview/end?redir={1}'"><span style="display:none;">In Preview Mode - click to end</span></a>
    ]]></PreviewBadge>

    <!-- How Umbraco should handle errors during macro execution. Can be one of the following values:
             - inline - show an inline error within the macro but allow the page to continue rendering. Historial Umbraco behaviour.
             - silent - Silently suppress the error and do not render the offending macro.
             - throw  - Throw an exception which can be caught by the global error handler defined in Application_OnError. If no such
                        error handler is defined then you'll see the Yellow Screen Of Death (YSOD) error page.
             Note the error can also be handled by the umbraco.macro.Error event, where you can log/alarm with your own code and change the behaviour per event. -->
    <MacroErrors>inline</MacroErrors>
    
    <!-- These file types will not be allowed to be uploaded via the upload control for media and content -->
    <disallowedUploadFiles>ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd</disallowedUploadFiles>

    <!-- If completed, only the file extensions listed below will be allowed to be uploaded.  If empty, disallowedUploadFiles will apply to prevent upload of specific file extensions. -->
    <allowedUploadFiles>jpg,png,gif</allowedUploadFiles>    

  </content>

  <security>
    <!-- set to true to auto update login interval (and there by disabling the lock screen -->
    <keepUserLoggedIn>true</keepUserLoggedIn>

    <!-- change in 4.8: Disabled users are now showed dimmed and last in the tree. If you prefer not to display them set this to true -->
    <hideDisabledUsersInBackoffice>false</hideDisabledUsersInBackoffice>

    <!-- set to true to enable the UI and API to allow back-office users to reset their passwords -->
    <allowPasswordReset>true</allowPasswordReset>

  </security>

  <requestHandler>
    <!-- this will add a trailing slash (/) to urls when in directory url mode -->
    <addTrailingSlash>true</addTrailingSlash>
    <urlReplacing removeDoubleDashes="true">
      <char org=" ">-</char>
      <char org="&quot;"></char>
      <char org="'"></char>
      <char org="%"></char>
      <char org="."></char>
      <char org=";"></char>
      <char org="/"></char>
      <char org="\"></char>
      <char org=":"></char>
      <char org="#"></char>
      <char org="+">plus</char>
      <char org="*">star</char>
      <char org="&amp;"></char>
      <char org="?"></char>
      <char org="æ">ae</char>
      <char org="ø">oe</char>
      <char org="å">aa</char>
      <char org="ä">ae</char>
      <char org="ö">oe</char>
      <char org="ü">ue</char>
      <char org="ß">ss</char>
      <char org="Ä">ae</char>
      <char org="Ö">oe</char>
      <char org="|">-</char>
      <char org="&lt;"></char>
      <char org="&gt;"></char>
    </urlReplacing>
  </requestHandler>

  <logging>
    <maxLogAge>1440</maxLogAge>
  </logging>

  <!-- 
    web.routing
      @trySkipIisCustomErrors
        Tries to skip IIS custom errors.
        Starting with IIS 7.5, this must be set to true for Umbraco 404 pages to show. Else, IIS will take
        over and render its built-in error page. See MS doc for HttpResponseBase.TrySkipIisCustomErrors.
        The default value is false, for backward compatibility reasons, which means that IIS _will_ take
        over, and _prevent_ Umbraco 404 pages to show.
      @internalRedirectPreservesTemplate
        By default as soon as we're not displaying the initial document, we reset the template set by the
        finder or by the alt. template. Set this option to true to preserve the template set by the finder
        or by the alt. template, in case of an internal redirect.
        (false by default, and in fact should remain false unless you know what you're doing)
  -->
  <web.routing
    trySkipIisCustomErrors="false"
    internalRedirectPreservesTemplate="false">
  </web.routing>

</settings>
