<< Klicken Sie hier um das Inhaltsverzeichnis anzuzeigen >> Navigation: Konfiguration > Kommunikation > Beispielkonfiguration |
Nachfolgende App.config konfiguriert den DABiS Server. Sie können diese Konfiguration als Vorlage verwenden und sie auf Ihre Bedrüfnisse anpassen. Mit dieser Konfiguration wird auch der IndexService konfiguriert.
Wenigstens folgende Einstellungen müssen Sie anpassen:
•In der Sektion <sohard.dabis.connection.cert> müssen Sie die Pfade zu Server- und Clientzertifikat anpassen. Die Zertifikate sind im Deployment enthalten.
•In der Sektion <connectionStrings> müssen Sie die Verbindung(en) zu ihren Datenbanken konfigurieren.
•Wenn Sie den IndexService nicht verwenden, sollten Sie den Dienst deaktivieren in dem Sie die Service-Sektion des IndexServices auskommentieren.
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
<section name="sohard.dabis.connection.cert" type="Sohard.Dabis.Connection.Cert.Configuration.Section, DabisConnection"/>
</configSections>
<sohard.dabis.connection.cert>
<services>
<add name="DabisServerImpl" serverCertificate="certificates\DabisServer.pfx|wcf" clientCertificates="certificates\DabisServer.cer"/>
<add name="DabisFileTransferServiceImpl" serverCertificate="certificates\DabisServer.pfx|wcf" clientCertificates="certificates\DabisServer.cer"/>
</services>
</sohard.dabis.connection.cert>
<system.serviceModel>
<services>
<!-- **** Service Konfiguration für DabisServer **** -->
<service behaviorConfiguration="DabisServerBehavior" name="Sohard.Dabis.Server.DabisServerImpl">
<endpoint name="DabisServer"
address="net.tcp://localhost:8000/DabisServer"
binding="netTcpBinding"
bindingConfiguration="DabisServerTcpBinding"
contract="Sohard.Dabis.ServiceContracts.IServerContract"/>
</service>
<!-- **** Service Konfiguration für DabisFileTransferService **** -->
<service behaviorConfiguration="DabisServerBehavior" name="Sohard.Dabis.Server.DabisFileTransferServiceImpl">
<endpoint name="DabisFileTransferService"
address="net.tcp://localhost:8006/DabisFileTransferService"
binding="netTcpBinding"
bindingConfiguration="DabisStreamingBinding"
contract="Sohard.Dabis.ServiceContracts.IServiceContractFileTransfer"/>
</service>
<!-- **** Service Konfiguration für DabisIndexService (Kommentieren Sie diese Sektion aus, damit der IndexService Webservice nicht gesatrtet wird )**** -->
<service behaviorConfiguration="DabisWebServerBehavior" name="Sohard.Dabis.Server.DabisIndexServiceImpl">
<endpoint address="http://localhost:8080/Web"
binding="webHttpBinding"
bindingConfiguration="DabisIndexServiceBinding"
contract="Sohard.Dabis.ServiceContracts.IServiceContractIndexSearch"
behaviorConfiguration="web" />
</service>
<!-- **** Service Konfiguration für DabisMobileBaseService (Kommentieren Sie diese Sektion aus, damit der DabisMobileBase Webservice nicht gesatrtet wird) **** -->
<service behaviorConfiguration="DabisWebServerBehavior" name="Sohard.Dabis.Server.DabisMobileBaseServiceImpl">
<endpoint address="http://localhost:8081/Web"
binding="webHttpBinding"
bindingConfiguration="DabisWebServiceBinding"
contract="Sohard.Dabis.Contracts.ServiceContracts.IServiceContractMobileBase"
behaviorConfiguration="web" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<!-- Service Behavior für DabisServer und DabisFileTransferService -->
<behavior name="DabisServerBehavior">
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
<!-- Service Behavior für DabisIndexService und DabisMobileBaseService -->
<behavior name="DabisWebServerBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceThrottling maxConcurrentSessions="100" />
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
<!-- Endpoint Behavior für DabisIndexService und DabisMobileBaseService -->
<endpointBehaviors>
<behavior name="web">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<!-- Tcp-Binding für den DabisServer und DabisFileTransferService -->
<netTcpBinding>
<binding name="DabisServerTcpBinding"
openTimeout="00:10:00"
receiveTimeout="00:10:00"
sendTimeout="00:10:00"
transferMode="Buffered"
maxBufferSize="2147483647"
maxConnections="100"
maxReceivedMessageSize="2147483647"
transactionFlow="true">
<readerQuotas maxDepth="32"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="4096"
maxNameTableCharCount="16384"/>
<security mode="Transport">
<transport clientCredentialType="Certificate"/>
</security>
</binding>
<binding name="DabisStreamingBinding"
transferMode="Streamed"
maxBufferSize="5000000"
maxReceivedMessageSize="5000000"
transactionFlow="true">
<readerQuotas maxDepth="32"
maxStringContentLength="5000000"
maxArrayLength="16384"
maxBytesPerRead="4096"
maxNameTableCharCount="16384"/>
<security mode="Transport">
<transport clientCredentialType="Certificate"/>
</security>
</binding>
</netTcpBinding>
<!-- Http-Binding für den DabisIndexService und DabisMobileBaseService -->
<webHttpBinding>
<binding name="DabisIndexServiceBinding"
openTimeout="00:02:00"
sendTimeout="00:02:00">
<security mode="None">
</security>
</binding>
<binding name="DabisWebServiceBinding"
openTimeout="00:02:00"
sendTimeout="00:02:00"
maxBufferSize="2147483647"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647"
transferMode="Streamed">
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="Basic" />
</security>
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider"
type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
serviceUri=""/>
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider"
type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
serviceUri=""
cacheTimeout="86400"/>
</providers>
</roleManager>
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="CoreLibraries;DevExpress;External"/>
</assemblyBinding>
</runtime>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>