<?xml version="1.0"?>

<configuration>

  <appSettings>
    <!-- ICachingProvider -->
    <add key="Caching.Provider" value="Microsoft.Samples.PlanMyNight.Web.Infrastructure.AspNetCachingProvider, PlanMyNight.Web" />

    <add key="Email.FromAddress" value="no-reply@planmynight.net" />
    <add key="Email.FromName" value="PlanMyNight" />

    <!-- LiveID (www.planmynight.net:48580) -->
    <add key="wll_appid" value="000000004C0176BA" />
    <add key="wll_secret" value="PpLRc71bmRVu6Y3r6WqBRuk1qow2dxV2" />
    <add key="wll_securityalgorithm" value="wsignin1.0" />

    <!-- LiveID (planmynight.net) -->
    <!--<add key="wll_appid" value="000000004801BBDF"/>
    <add key="wll_secret" value="V2oeOwvc8Kh8zYf753LpAA3ZWHGgq5Cb"/>
    <add key="wll_securityalgorithm" value="wsignin1.0"/>-->

    <add key="bingMapsAccountId" value="145724" />
    <add key="bingMapsAccountPassword" value="Pl4n.My.N1ght" />

    <!-- Use Microsoft Delivery Network -->
    <add key="useCdn" value="true" />

  </appSettings>

  <connectionStrings>
    <add name="PlanMyNightEntities" connectionString="metadata=res://*/PlanMyNight.csdl|res://*/PlanMyNight.ssdl|res://*/PlanMyNight.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\PlanMyNight.mdf;Integrated Security=True;User Instance=True;Connect Timeout=30;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
    <add name="ApplicationServices" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\PlanMyNight.mdf;Integrated Security=True;User Instance=True;Connect Timeout=30;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
  </connectionStrings>

  <system.net>
    <mailSettings>
      <!-- local folder -->
      <smtp deliveryMethod="SpecifiedPickupDirectory">
        <specifiedPickupDirectory pickupDirectoryLocation="c:\inetpub\temp\" />
      </smtp>

      <!-- remote smtp -->
      <!--<smtp>
        <network host="localhost" />
      </smtp>-->
    </mailSettings>
  </system.net>

  <system.web>

    <customErrors mode="On" defaultRedirect="~/Error.htm">
      <error statusCode="404" redirect="~/NotFound.htm" />
    </customErrors>
    
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </assemblies>
    </compilation>

    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login" name="XAUTH" timeout="2880" path="~/" />
    </authentication>

    <membership>
      <providers>
        <clear />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/" />
      </providers>
    </membership>

    <profile enabled="true">
      <properties>
        <add name="FullName" type="string" />
        <add name="State" type="string" />
        <add name="City" type="string" />
        <add name="PreferredActivityTypeId" type="int" />
      </properties>
      <providers>
        <clear />
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ApplicationServices" applicationName="/" />
      </providers>
    </profile>

    <roleManager enabled="false">
      <providers>
        <clear />
        <add connectionStringName="ApplicationServices" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        <add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      </providers>
    </roleManager>

    <machineKey validationKey="1654B87FB7F6D14BED208FF93D90F77C69019501D5A6D7A18284A1F0899A420B83B3685A4A2861F2150E6F05B6B1D618B3D5CEF2B388A1EC1523D577C1D7F8B8" decryptionKey="950BB46D70B44288A727F5DBD17FD5349A7827397D7833A0" validation="MD5" />

    <xhtmlConformance mode="Strict" />

    <pages>
      <namespaces>
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="Microsoft.Web.Mvc" />
        <add namespace="Microsoft.Samples.PlanMyNight" />
        <add namespace="Microsoft.Samples.PlanMyNight.Entities" />
        <add namespace="Microsoft.Samples.PlanMyNight.Infrastructure.Mvc" />
        <add namespace="Microsoft.Samples.PlanMyNight.Web" />
        <add namespace="Microsoft.Samples.PlanMyNight.Web.Controllers" />
        <add namespace="Microsoft.Samples.PlanMyNight.Web.ViewModels" />
      </namespaces>
    </pages>

    <httpHandlers>
      <add verb="*" path="*.mvc" validate="false" type="System.Web.Mvc.MvcHttpHandler" />
      <add verb="*" path="JsCombine.ashx" type="Microsoft.Samples.PlanMyNight.Web.Infrastructure.JSCombineHandler" />
    </httpHandlers>
  </system.web>

  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true"/>
    <handlers>
      <remove name="MvcHttpHandler" />
      <remove name="JsCombine" />
      <add name="MvcHttpHandler" preCondition="integratedMode" verb="*" path="*.mvc" type="System.Web.Mvc.MvcHttpHandler" />
      <add name="JsCombine" verb="*" path="JsCombine.ashx" type="Microsoft.Samples.PlanMyNight.Web.Infrastructure.JSCombineHandler" />
    </handlers>
  </system.webServer>

  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IGeocodeService" 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>
        <binding name="BasicHttpBinding_ISearchService" 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://staging.dev.virtualearth.net/webservices/v1/geocodeservice/GeocodeService.svc"
          binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IGeocodeService"
          contract="VEGeocodingService.IGeocodeService" name="BasicHttpBinding_IGeocodeService" />
      <endpoint address="http://staging.dev.virtualearth.net/webservices/v1/searchservice/searchservice.svc"
          binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISearchService"
          contract="VESearchService.ISearchService" name="BasicHttpBinding_ISearchService" />
    </client>
  </system.serviceModel>

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

