Edit configuration files

If you need to edit configuration files manually after installation, here is a guide to which parts that may need to be modified.

There's a few reasons why you might need to edit the configuration files. One is that you entered incorrect information during setup. The other is if you for some reason have changed the name of your server, or you want to change the Remote Restart password.

Client configuration file

The config file is placed in the installation folder that you specified during installation. It's normally C:\Program Files (x86)\Remote Restart\. The file is named RestartClient.exe.config.

In the client configuration file, the server name has two occurances. One is in the endpoint address, and the other is in servicePrincipalName.
The password is located at the bottom.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="Restart.Client.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IWcfService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
          <security mode="Message">
            <transport clientCredentialType="Windows" proxyCredentialType="None" realm="">
              <extendedProtectionPolicy policyEnforcement="Never" />
            </transport>
            <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" />
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
    <client>
      <!-- todo: replace my-home-server with you server name -->
      <endpoint address="http://my-home-server:8731/RestartService/WcfService" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IWcfService" contract="ServiceReference1.IWcfService" name="WSHttpBinding_IWcfService">
        <identity>
          <!-- todo: replace my-home-server with you server name -->
          <servicePrincipalName value="host/my-home-server" />
        </identity>
      </endpoint>
    </client>
  </system.serviceModel>
  <applicationSettings>
    <Restart.Client.Properties.Settings>
      <setting name="Password" serializeAs="String">
        <!-- todo: Change password to a more secure one. -->
        <value>P@ssw0rd</value>
      </setting>
    </Restart.Client.Properties.Settings>
  </applicationSettings>
</configuration>

Server configuration file

The config file is placed in the installation folder that you specified during installation. It's normally C:\Program Files\Restart Service\. The file is named Service.exe.config.

In the server configuration file, the server name has one occurance: baseAddress
The password is located at the top.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="Restart.Service.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <applicationSettings>
    <Restart.Service.Properties.Settings>
      <setting name="Password" serializeAs="String">
        <!-- todo: Change password to a more secure one. -->
        <value>P@ssw0rd</value>
      </setting>
    </Restart.Service.Properties.Settings>
  </applicationSettings>
  <system.serviceModel>
    <services>
      <service name="Restart.Service.WcfService" behaviorConfiguration="RestartServiceBehavior">
        <host>
          <baseAddresses>
            <!-- todo: replace my-home-server with you server name -->
            <add baseAddress="http://my-home-server:8731/RestartService/WcfService" />
          </baseAddresses>
        </host>
        <!-- this endpoint is exposed at the base address provided by host: http://my-home-server:8731/RestartService/WcfService  -->
        <endpoint address="" binding="wsHttpBinding" contract="Restart.Service.IWcfService" />
        <!-- the mex endpoint is exposed at http://my-home-server:8731/RestartService/WcfService/mex -->
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="RestartServiceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>

Last edited May 21, 2011 at 10:40 PM by eloekset, version 1

Comments

No comments yet.