Does the Navision (2009) Webservice support authentication to a remote database?
<p>I'm currently attempting to deploy the Navision webservice (from Dynamics Navision 2009) and am finding that the webservice authenticates when connecting to a local Navision SQL database but <strong>NOT</strong> a remote Navision SQL database.</p>

<p>So we have servers S (with a full Navision install) and W (with only the Services installed). The CustomSettings.config file on these two systems is identical except that where S references localhost:</p>

<pre><code>&lt;add key="DatabaseServer" value="127.0.0.1"&gt;&lt;/add&gt;
&lt;add key="ClientCredentialType" value="Windows"&gt;&lt;/add&gt;
</code></pre>

<p>W references S:</p>

<pre><code>&lt;add key="DatabaseServer" value="S"&gt;&lt;/add&gt;
&lt;add key="ClientCredentialType" value="Windows"&gt;&lt;/add&gt;
</code></pre>

<p>(Other details omitted.) The webservice itself is running as the same domain user in both cases, and that user is authenticated within Navision.</p>

<p>When I connect to the webservice which is running on S, authentication works and the service proceeds as normal:</p>

<pre><code>http://S:7047/DynamicsNAV/WS/Company/Codeunit/RLIntegartion
</code></pre>

<p>I'll omit the actual result here. When connecting via W instead:</p>

<pre><code>http://W:7047/DynamicsNAV/WS/Company/Codeunit/RLIntegartion
</code></pre>

<p>the webservice instead returns XML indicating an authentication failure:</p>

<pre><code>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Body&gt;
    &lt;s:Fault&gt;
      &lt;faultcode xmlns:a="urn:microsoft-dynamics-schemas/error"&gt;
        a:Microsoft.Dynamics.Nav.Types.NavDatabasePasswordException
      &lt;/faultcode&gt;
      &lt;faultstring xml:lang="en-US"&gt;
        The login failed when connecting to SQL Server S.
      &lt;/faultstring&gt;
      &lt;detail&gt;
        &lt;string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"&gt;
          The login failed when connecting to SQL Server S.
        &lt;/string&gt;
      &lt;/detail&gt;
    &lt;/s:Fault&gt;
  &lt;/s:Body&gt;
&lt;/s:Envelope&gt;
</code></pre>

<p>I can configure an ODBC connection on W to the Navision database on S and the connection succeeds and authenticates correctly, so the actual database connection and authentication appears to be fine.</p>

<p>I'm aware that the webservice itself must normally be accessed locally so that any files written can be read from where the Navision webservice has written them, but from what I can tell in the documentation the webservice may legitimately access the database from a separate server. However, in practice (per above) this doesn't seem to actually work.</p>

<p>Is this a restriction that Navision imposes? If not, does anyone have any suggestions as to why the webservice is failing to authenticate when accessing a remote database when the same webservice succeeds locally?</p>

<p>Or could it be a limitation imposed by the codeunit programmers? I've spoken to them and they indicate that this should work, but clearly it does not.</p>