Click here to Skip to main content
15,884,177 members
Articles / Desktop Programming / Windows Forms

Visual Application Launcher

Rate me:
Please Sign up or sign in to vote.
4.91/5 (37 votes)
23 Jan 2012CPOL23 min read 107K   3.7K   116  
A WinForms UI using WCF services, Entity Framework, repository data access, repository caching, Unit of Work, Dependency Injection, and every other buzz work you can think of!
<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="VAL" type="VAL.Common.Configuration.VALSection, VAL.Common, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null" allowDefinition="Everywhere" allowExeDefinition="MachineToApplication" restartOnExternalChanges="true"/>
    <section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
  </configSections>
  <log4net>
    <root>
      <level value="ALL"/>
      <appender-ref ref="RollingLogFileAppender"/>
    </root>
    <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value=".\\Logs\\val-logfile.txt"/>
      <appendToFile value="true"/>
      <rollingStyle value="Size"/>
      <datePattern value="yyyyMMdd"/>
      <maxSizeRollBackups value="5"/>
      <maximumFileSize value="100KB"/>
      <staticLogFileName value="true"/>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%d [%t] %-5p %c - %m%n"/>
      </layout>
    </appender>
  </log4net>
  <VAL name="VisualApplicationLauncher">
    <settings 
      name="Default"
      microsoftOfficeLocation="C:\Program Files\Microsoft Office\"
      distributeWorkgroups="false"
      reportingEnabled="true"
      activeDirectoryDomain=""
      administratorDomainGroup="Administrators"
      helpDirectory=""
      enterpriseWorkgroupDirectory=""      
      enterpriseWorkgroupName=""
      enterpriseAdminUserName=""
      enterpriseAdminPassword=""
      accessDatabaseLocation=""
      localDatabaseDirectory=""
      allowedFileTypeDialogFilter="Executable Files|*.exe|Access Databases|*.mdb|Access Applications|*.mde|Excel Files|*.xls;*.xlsx"
    />    
  </VAL>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="VALBasicHttp" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            allowCookies="false" bypassProxyOnLocal="true" hostNameComparisonMode="StrongWildcard"
            maxBufferSize="1000000" maxBufferPoolSize="524288" maxReceivedMessageSize="1000000"
            messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
            useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows" />
          </security>
        </binding>
      </basicHttpBinding>      
    </bindings>
    <client>
      <endpoint address="http://localhost/VAL/AdministrationService.svc"
          binding="basicHttpBinding" bindingConfiguration="VALBasicHttp"
          contract="VAL.Contracts.IAdministratorService" name="IAdministratorService_Endpoint" />
      
      <endpoint address="http://localhost/VAL/StandardUserService.svc"
          binding="basicHttpBinding" bindingConfiguration="VALBasicHttp"
          contract="VAL.Contracts.IStandardUserService" name="IStandardUserService_Endpoint" />
    </client>
    <behaviors>
      <endpointBehaviors>
        <behavior name="clientEndpointCredential">
          <clientCredentials>
            <windows allowNtlm="true" allowedImpersonationLevel="None" />
          </clientCredentials>
        </behavior>
      </endpointBehaviors>
    </behaviors>
  </system.serviceModel>
  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel"
              switchValue="Information, ActivityTracing"
              propagateActivity="true">
        <listeners>
          <add name="traceListener"
              type="System.Diagnostics.XmlWriterTraceListener"
              initializeData= "c:\logs\Traces.svclog" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>
  <startup>
	<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions