Skip to content

webservice setup

Karl Tarbet edited this page May 5, 2016 · 4 revisions

For self hosting using Nancy

Windows permission setting is required to allow requests on a port. I'm using 8080 for my testing.

C:\WINDOWS\system32>netsh http add urlacl url="http://+:8080/" user="Everyone"

URL reservation successfully added
C:\WINDOWS\system32>

PiscesWebServices.exe --server

debugging PiscesWebServices.exe --server --verbose

Configuration (App.config) for MySQL

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="MySqlServer" value="localhost" />
    <add key="MySqlDatabase" value="timeseries" />
    <add key="MySqlUser" value="web_user" />
    <add key="InternalNetworkPrefix" value="140." />
    <add key="LocalConfigurationDataPath" value="\\ibr1pnrfp01\common\PN6200\Hydromet\ConfigurationData" />
    <add key="ClientSettingsProvider.ServiceUri" value="" />
  </appSettings>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>