I have a WCF service hosted inside a Windows Service. (SO its not hosted in IIS, it is selfhosted)
The application makes it possible to receive measurements through HTTP. These are currently being written to a txt file.
I also have a Task configured that runs everyday at a specific time.
The problem i have is that when i dont receive a measurement through HTTP for atleast 5 minutes the service seems to go idle.
I noticed that after 5 minutes it takes 30 seconds for the service to respond. After 30 seconds if i send measurements through http i get a fast response.
What could be the problem?
app.config
<?xml version="1.0"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Applicatie.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<connectionStrings>
</connectionStrings>
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="LargeWeb" maxBufferSize="1500000" maxBufferPoolSize="1500000"
maxReceivedMessageSize="2000000000" transferMode="Streamed">
<readerQuotas maxDepth="32" maxStringContentLength="656000" maxArrayLength="656000"
maxBytesPerRead="656000" maxNameTableCharCount="656000" />
</binding>
</webHttpBinding>
</bindings>
<services>
<service name="Applicatie.Applicatie" behaviorConfiguration="Proxy">
<host>
<baseAddresses>
<add baseAddress="http://localhost:5001/Applicatie"/>
</baseAddresses>
</host>
<endpoint address="" binding="webHttpBinding" bindingConfiguration="LargeWeb" behaviorConfiguration="webBehavior" contract="Applicatie.IApplicatie"/>
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="webBehavior">
<webHttp/>
<CorsSupport />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="Proxy">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<extensions>
<behaviorExtensions>
<add name="CorsSupport" type="WebHttpCors.CorsSupportBehaviorElement, WebHttpCors, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
</behaviorExtensions>
</extensions>
</system.serviceModel>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
<!--<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>-->
</entityFramework>
</configuration>