<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <configSections>
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data"/>
  </configSections>
  <dataConfiguration defaultDatabase="AccessDB"/>
  <connectionStrings>
    <clear/>
    <add name="AccessProviderDB" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\ASPNetDB.mdb" providerName="System.Data.OleDb"/>
    <add name="AccessDB" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\ims.mdb" providerName="System.Data.OleDb"/>
    <add name="SqlProviderDB" connectionString="Data Source=.\sqlexpress;Initial Catalog=landian_ims_aspnetdb;Integrated Security=True" providerName="System.Data.SqlClient"/>
    <add name="SqlDB" connectionString="Data Source=.\sqlexpress;Initial Catalog=landian_ims;Integrated Security=True" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <appSettings>
    <add key="Setup" value="False"/>
    <add key="WelcomeShown" value="False"/>
    <add key="UpdateUrl" value="https://landian.cc/download/update.xml" />
  </appSettings>
  <system.web>
    <trace enabled="false" localOnly="true"/>
    <compilation debug="false" defaultLanguage="c#" targetFramework="4.5">
      <assemblies>
        <add assembly="System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
      </assemblies>
    </compilation>
    <sessionState mode="InProc" cookieless="UseCookies" stateConnectionString="tcpip=127.0.0.1:42424" timeout="20"/>
    <roleManager enabled="true" defaultProvider="AccessRoleProvider">
      <providers>
        <clear/>
        <add connectionStringName="AccessProviderDB" applicationName="landian_ims" name="AccessRoleProvider" type="ims.AccessProviders.AccessRoleProvider"/>
        <add connectionStringName="SqlProviderDB" applicationName="landian_ims" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider"/>
      </providers>
    </roleManager>
    <authentication mode="Forms">
      <forms name="landian_ims" loginUrl="login.aspx" timeout="40320" slidingExpiration="true" defaultUrl="default.aspx" protection="All" cookieless="UseCookies"/>
    </authentication>
    <authorization>
      <allow users="*"/>
    </authorization>
    <customErrors mode="Off" defaultRedirect="error.htm"/>
    <anonymousIdentification enabled="true" cookieName=".IMSANONYMOUS" cookieless="UseCookies"/>
    <profile enabled="true" defaultProvider="AccessProfileProvider" automaticSaveEnabled="false">
      <providers>
        <clear/>
        <add connectionStringName="AccessProviderDB" applicationName="landian_ims" name="AccessProfileProvider" type="ims.AccessProviders.AccessProfileProvider"/>
        <add connectionStringName="SqlProviderDB" applicationName="landian_ims" name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider"/>
      </providers>
      <properties>
        <add name="Theme" allowAnonymous="true"/>
        <add name="ShoppingCart" serializeAs="Binary" type="ims.Model.Cart" allowAnonymous="true"/>
        <add name="Favorites" serializeAs="Binary" type="System.Collections.Generic.Dictionary`2[[ims.Model.ObjIndex,ims.Model],System.String]" allowAnonymous="true"/>
        <add name="DataReadingSetting" serializeAs="Binary" type="ims.Model.getData_setting" allowAnonymous="true"/>
        <add name="MyShortcuts" serializeAs="Binary" type="System.Collections.Generic.List`1[[ims.Model.Shortcut,ims.Model]]" allowAnonymous="true"/>
        <add name="PopHelper" serializeAs="Binary" type="ims.Model.PopHelper" allowAnonymous="true"/>
        <add name="InfoListSetting" serializeAs="Xml" type="ims.Model.InfoListSetting" allowAnonymous="true"/>
        <add name="SearchProfile" serializeAs="Xml" type="ims.SearchProfile" allowAnonymous="true" />
        <add name="CommProfile" serializeAs="Xml" type="ims.CommProfile" allowAnonymous="true" />
        <add name="TempletOrders" serializeAs="Binary" type="ims.Model.TempletOrders" allowAnonymous="true"/>
        <add name="DirOrders" serializeAs="Binary" type="ims.Model.DirOrders" allowAnonymous="true"/>
        <add name="FileOrders" serializeAs="Binary" type="ims.Model.FileOrders" allowAnonymous="true" />
      </properties>
    </profile>
    <membership defaultProvider="AccessMembershipProvider">
      <providers>
        <clear/>
        <add minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" connectionStringName="AccessProviderDB" maxInvalidPasswordAttempts="5" passwordAttemptWindow="5" enablePasswordReset="true" enablePasswordRetrieval="false" applicationName="landian_ims" hashAlgorithmType="SHA1" requiresQuestionAndAnswer="true" requiresUniqueEmail="false" passwordFormat="Hashed" name="AccessMembershipProvider" type="ims.AccessProviders.AccessMembershipProvider"/>
        <add connectionStringName="SqlProviderDB" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="landian_ims" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="5" name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider"/>
      </providers>
    </membership>
    <pages theme="" enableEventValidation="false" validateRequest="false" enableViewStateMac="false">
      <controls>
        <add tagPrefix="ims" tagName="Pop" src="~/UserControls/pop.ascx"/>
        <add tagPrefix="ims" tagName="Mpop" src="~/UserControls/mpop.ascx"/>
        <add tagPrefix="ims" tagName="Nav" src="~/UserControls/header.ascx"/>
      </controls>
    </pages>
    <httpHandlers>
      <add verb="*" path="Thumb.ashx" type="ims.Thumb"/>
      <add verb="*" path="BarCode.ashx" type="ims.BarCode"/>
      <add verb="*" path="UploadFiles" type="ims.FilesHandler"/>
      <add verb="*" path="InfoAttach" type="ims.FilesHandler"/>
      <add verb="*" path="Files" type="ims.FilesHandler"/>
      <add verb="*" path="Logs" type="ims.LogHandler"/>
      <!--以下用于UWS环境-->
      <add verb="*" path="UploadFiles/*/*,Files/*/*,InfoAttach/*/*" type="ims.FilesHandler"/>
      <add verb="*" path="Logs/*" type="ims.LogHandler"/>
    </httpHandlers>
    <globalization culture="zh-cn" uiCulture="zh-cn" requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8"/>
    <httpRuntime requestValidationMode="2.0" executionTimeout="900" maxRequestLength="2097150" useFullyQualifiedRedirectUrl="false"/>
    <machineKey validationKey="86B6275BA31D3D713E41388692FCA68F7D20269411345AA1C17A7386DACC9C46E7CE5F97F556F3CF0A07159659E2706B77731779D2DA4B53BC47BFFD4FD48A54" decryptionKey="9421E53E196BB56DB11B9C25197A2AD470638EFBC604AC74CD29DBBCF79D6046" validation="SHA1" decryption="AES" />
  </system.web>
  <system.webServer>
    <modules> 
      <remove name="WebDAVModule" />
    </modules>
    <handlers>
      <add name="thumbHandler" verb="*" preCondition="integratedMode" path="Thumb.ashx" type="ims.Thumb" />
      <add name="barCode" verb="*" preCondition="integratedMode" path="BarCode.ashx" type="ims.BarCode" />
      <add name="_uploadFiles" verb="*" preCondition="classicMode" path="UploadFiles" type="ims.FilesHandler" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" />
      <add name="uploadFiles" verb="*" preCondition="integratedMode" path="UploadFiles" type="ims.FilesHandler" />
      <add name="_infoAttach" verb="*" preCondition="classicMode" path="InfoAttach" type="ims.FilesHandler" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" />
      <add name="infoAttach" verb="*" preCondition="integratedMode" path="InfoAttach" type="ims.FilesHandler" />
      <add name="_files" verb="*" preCondition="classicMode" path="Files" type="ims.FilesHandler" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" />
      <add name="files" verb="*" preCondition="integratedMode" path="Files" type="ims.FilesHandler" />
      <add name="_logs" verb="*" preCondition="classicMode" path="Logs" type="ims.LogHandler" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" />
      <add name="logs" verb="*" preCondition="integratedMode" path="Logs" type="ims.LogHandler" />
      <!--以下用于WebApi-->
      <remove name="WebDAV" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
    <security>
      <requestFiltering>
        <requestLimits maxQueryString="16380" maxAllowedContentLength="2147483645"/>
      </requestFiltering>
    </security>
    <defaultDocument>
      <files>
        <clear/>
        <add value="default.aspx" />
      </files>
    </defaultDocument>
    <staticContent>
      <remove fileExtension=".apk"/>
      <remove fileExtension=".dwg"/>
      <remove fileExtension="*"/>
      <mimeMap fileExtension=".apk" mimeType="application/vnd.android" />
      <mimeMap fileExtension=".dwg" mimeType="application/octet-stream" />
      <mimeMap fileExtension="*" mimeType="application/octet-stream" />
    </staticContent>
    <validation validateIntegratedModeConfiguration="false"/>
  </system.webServer>
  <runtime xmlns="">
    <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>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.6.0" newVersion="5.2.6.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
