Changeset 9527


Ignore:
Timestamp:
05/24/13 15:12:40 (6 years ago)
Author:
pfleck
Message:

#2063
Provides a GUI for SelfHosting Hive-Service to start and stop the service.
Enables start and stop Janitor with adjustable frequency.
Run Cleanup and GenerateStatistics separately on click.

Location:
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.SelfHost/3.3
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.SelfHost/3.3/App.config

    r9434 r9527  
    1 <?xml version="1.0"?>
     1<?xml version="1.0"?>
    22<configuration>
    33  <configSections>
     
    66    </sectionGroup>
    77  </configSections>
    8 
    98  <appSettings>
    109    <add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
     10    <add key="ClientSettingsProvider.ServiceUri" value="" />
    1111  </appSettings>
    1212  <applicationSettings>
     
    2121  </applicationSettings>
    2222  <connectionStrings>
    23     <add name="HeuristicLab.Authentication" connectionString="data source=localhost;Integrated Security=SSPI;Initial Catalog=HeuristicLab.Authentication"/>
    24     <add name="HeuristicLab.Services.Hive.DataAccess.Settings.HeuristicLab_Hive_LinqConnectionString"
    25        connectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.3;Integrated Security=True;"
    26        providerName="System.Data.SqlClient" />
     23    <add name="HeuristicLab.Authentication" connectionString="data source=localhost;Integrated Security=SSPI;Initial Catalog=HeuristicLab.Authentication" />
     24    <add name="HeuristicLab.Services.Hive.DataAccess.Settings.HeuristicLab_Hive_LinqConnectionString" connectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.3;Integrated Security=True;" providerName="System.Data.SqlClient" />
    2725  </connectionStrings>
    2826  <system.web>
     
    3028    <compilation debug="true" targetFramework="4.0">
    3129      <assemblies>
    32         <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
     30        <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    3331      </assemblies>
    3432    </compilation>
    35     <membership>
     33    <membership defaultProvider="ClientAuthenticationMembershipProvider">
    3634      <providers>
    37         <clear/>
    38         <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="HeuristicLab.Authentication" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="HeuristicLab.Authentication"/>
     35        <clear />
     36        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="HeuristicLab.Authentication" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="HeuristicLab.Authentication" />
     37        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
    3938      </providers>
    4039    </membership>
    41     <roleManager enabled="true">
     40    <roleManager enabled="true" defaultProvider="ClientRoleProvider">
    4241      <providers>
    43         <clear/>
    44         <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="HeuristicLab.Authentication" applicationName="HeuristicLab.Authentication"/>
     42        <clear />
     43        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="HeuristicLab.Authentication" applicationName="HeuristicLab.Authentication" />
     44        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
    4545      </providers>
    4646    </roleManager>
    4747    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
    4848      <controls>
    49         <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
    50          assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
     49        <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    5150      </controls>
    5251    </pages>
    53     <httpRuntime maxRequestLength="1048576"/>
     52    <httpRuntime maxRequestLength="1048576" />
    5453  </system.web>
    5554  <system.serviceModel>
    5655    <diagnostics performanceCounters="All">
    57       <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="3000"/>
     56      <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="3000" />
    5857    </diagnostics>
    5958    <bindings>
     
    6261          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    6362          <security mode="Message">
    64             <transport clientCredentialType="Certificate"/>
    65             <message clientCredentialType="UserName"/>
     63            <transport clientCredentialType="Certificate" />
     64            <message clientCredentialType="UserName" />
    6665          </security>
    6766        </binding>
     
    7271        <behavior name="ServiceBehaviour_IHiveService">
    7372          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
    74           <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false"/>
     73          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
    7574          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
    76           <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true"/>
    77           <serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="AspNetSqlRoleProvider"/>
     75          <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
     76          <serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="AspNetSqlRoleProvider" />
    7877          <serviceCredentials>
    79             <serviceCertificate findValue="localhost" x509FindType="FindBySubjectName"/>
    80             <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="AspNetSqlMembershipProvider"/>
     78            <serviceCertificate findValue="localhost" x509FindType="FindBySubjectName" />
     79            <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="AspNetSqlMembershipProvider" />
    8180          </serviceCredentials>
    82           <serviceSecurityAudit auditLogLocation="Application" suppressAuditFailure="false" messageAuthenticationAuditLevel="SuccessOrFailure"/>
    83           <serviceThrottling maxConcurrentCalls="100"/>
    84           <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
     81          <serviceSecurityAudit auditLogLocation="Application" suppressAuditFailure="false" messageAuthenticationAuditLevel="SuccessOrFailure" />
     82          <serviceThrottling maxConcurrentCalls="100" />
     83          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
    8584        </behavior>
    8685      </serviceBehaviors>
     
    8887    <services>
    8988      <service behaviorConfiguration="ServiceBehaviour_IHiveService" name="HeuristicLab.Services.Hive.HiveService">
    90         <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="MexEndpoint" contract="IMetadataExchange"/>
    91         <endpoint binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" name="WSHttpBinding_IHiveService" contract="HeuristicLab.Services.Hive.ServiceContracts.IHiveService"/>
     89        <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="MexEndpoint" contract="IMetadataExchange" />
     90        <endpoint binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" name="WSHttpBinding_IHiveService" contract="HeuristicLab.Services.Hive.ServiceContracts.IHiveService" />
    9291      </service>
    9392    </services>
    94     <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
     93    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    9594  </system.serviceModel>
    9695  <system.webServer>
     
    9897    <handlers>
    9998      <remove name="ChartImageHandler" />
    100       <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST"
    101        path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
     99      <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    102100    </handlers>
    103101  </system.webServer>
     102  <startup>
     103    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
     104  </startup>
    104105</configuration>
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.SelfHost/3.3/HeuristicLab.Services.Hive.SelfHost-3.3.csproj

    r9434 r9527  
    66    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    77    <ProjectGuid>{DAACE3EB-5D88-419D-9EEC-5707E273491A}</ProjectGuid>
    8     <OutputType>Exe</OutputType>
     8    <OutputType>WinExe</OutputType>
    99    <AppDesignerFolder>Properties</AppDesignerFolder>
    1010    <RootNamespace>HeuristicLab.Services.Hive.SelfHost</RootNamespace>
    1111    <AssemblyName>HeuristicLab.Services.Hive.SelfHost-3.3</AssemblyName>
    12     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     12    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    1313    <FileAlignment>512</FileAlignment>
     14    <IsWebBootstrapper>false</IsWebBootstrapper>
    1415    <PublishUrl>publish\</PublishUrl>
    1516    <Install>true</Install>
     
    2425    <ApplicationRevision>0</ApplicationRevision>
    2526    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    26     <IsWebBootstrapper>false</IsWebBootstrapper>
    2727    <UseApplicationTrust>false</UseApplicationTrust>
    2828    <BootstrapperEnabled>true</BootstrapperEnabled>
     29    <TargetFrameworkProfile />
    2930  </PropertyGroup>
    3031  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     
    3738    <ErrorReport>prompt</ErrorReport>
    3839    <WarningLevel>4</WarningLevel>
     40    <Prefer32Bit>false</Prefer32Bit>
    3941  </PropertyGroup>
    4042  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     
    4648    <ErrorReport>prompt</ErrorReport>
    4749    <WarningLevel>4</WarningLevel>
     50    <Prefer32Bit>false</Prefer32Bit>
     51  </PropertyGroup>
     52  <PropertyGroup>
     53    <StartupObject />
    4854  </PropertyGroup>
    4955  <ItemGroup>
    5056    <Reference Include="System" />
     57    <Reference Include="System.Configuration" />
    5158    <Reference Include="System.Core" />
     59    <Reference Include="System.Data" />
     60    <Reference Include="System.Drawing" />
    5261    <Reference Include="System.ServiceModel" />
     62    <Reference Include="System.Web.Extensions" />
     63    <Reference Include="System.Windows.Forms" />
     64    <Reference Include="System.Xml" />
    5365  </ItemGroup>
    5466  <ItemGroup>
     67    <Compile Include="JanitorActivatorForm.cs">
     68      <SubType>Form</SubType>
     69    </Compile>
     70    <Compile Include="JanitorActivatorForm.Designer.cs">
     71      <DependentUpon>JanitorActivatorForm.cs</DependentUpon>
     72    </Compile>
    5573    <Compile Include="Program.cs" />
    5674    <None Include="App.config" />
     
    86104    </BootstrapperPackage>
    87105  </ItemGroup>
     106  <ItemGroup>
     107    <EmbeddedResource Include="JanitorActivatorForm.resx">
     108      <DependentUpon>JanitorActivatorForm.cs</DependentUpon>
     109    </EmbeddedResource>
     110  </ItemGroup>
    88111  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    89112  <PropertyGroup>
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.SelfHost/3.3/Program.cs

    r9434 r9527  
    2121
    2222using System;
    23 using System.ServiceModel;
     23using System.Windows.Forms;
     24
    2425namespace HeuristicLab.Services.Hive.SelfHost {
    25   class Program {
    26     static void Main(string[] args) {
    27       var baseAdress = new Uri(@"http://localhost/Hive-3.3/HiveService.svc");
    28 
    29       using (var host = new ServiceHost(typeof(HiveService), baseAdress)) {
    30         host.Open();
    31 
    32         Console.WriteLine("Service is ready at {0}", baseAdress);
    33         Console.WriteLine("Press <Enter> to stop the service.");
    34 
    35         Console.ReadLine();
    36 
    37         host.Close();
    38       }
     26  internal class Program {
     27    [STAThread]
     28    private static void Main(string[] args) {
     29      Application.Run(new JanitorActivatorForm());
    3930    }
    4031  }
Note: See TracChangeset for help on using the changeset viewer.