Knowledge Base - API
Breadcrumbs

Troubleshooting the Query Service

Configuration issues may arise as you're developing your Web Configuration Service client application. This section is geared toward assisting you in identifying and troubleshooting commonly encountered error messages.

Tips

Always Check the Experlogix Logs on the Server

If the service is not working in general or not returning the result that you're expecting, the first thing to check is the log files on the server. The service is a server component and if there are any errors initializing it or if there are any issues connecting to other server resources (i.e. CRM, AX, databases, file system, etc.) those messages will be captured on the server and logged.

The Experlogix Log Viewer is an invaluable tool in digging into the logs to determine the error(s) that occurred.

Verify the Experlogix Site and Service are Running from a Browser

Test the following on the Experlogix server to ensure that the system is installed correctly:

  • That the Experlogix website is running. Navigating directly to the Experlogix site in a browser should show the 'about' page. (e.g., http://server/experlogix).

  • That Experlogix is working properly. Launch Experlogix from the quote or order screen in the host system to verify that the Configurator is live.

  • The service is installed and running. The service will be in the \experlogix\services folder with the name of webconfig.svc along with a web.config file and can be opened in a browser (e.g., http://server/experlogix/services/webconfig.svc).

  • If running in a CRM environment, verify that the Services Home page displays properly (e.g., http://server/experlogix/services).

Check the Client and Server Computer Times

Verify that the computer times on the server and client are the same. Also verify that their time-zone and daylight saving time settings are correct. By default WCF allows a time skew (i.e. time difference between the system clocks of the client and server) of 5 minutes for security purposes and to help prevent replay attacks. If your system times are not synchronized you will receive security exceptions attempting to communicate.

Verify Client and Server Binding Consistency

Inconsistent bindings between the server and the client can lead to problems getting a response from the server. This may manifest as a timeout (usually around the 1 minute mark), an app that hangs on some requests, or other communication problems.

If using the recommended, default bindings on the server and the Experlogix Contracts .dll, the bindings should already be correct. However, if your client was generated through Visual Studio or from the command line (svcutil.exe), you should verify that your bindings are correct in application's configuration file.

Most often, the missed settings are allowCookies, maxReceivedMessageSize, and the various readerQuotas values. If you're using a generated client, double check that these settings match those on the server.

 

See the example binding below:

<wsHttpBinding>
    <binding name="httpWebConfigSvc"
             messageEncoding="Mtom"
             maxReceivedMessageSize="2147483647"
             receiveTimeout="01:00:00"
             sendTimeout="01:00:00"
             allowCookies="true">
         <reliableSession enabled="true" />
         <security mode="TransportWithMessageCredential">
             <transport clientCredentialType="None" />
             <message clientCredentialType="Certificate" />
         </security>
         <readerQuotas maxArrayLength="2147483647" maxStringContentLength="2147483647" />
     </binding>
 </wsHttpBinding>
 

Error Messages

Error: HTTP Error 500.19 - Internal Server Error

Verify that anonymous authentication has been enabled. You may need to update the configuration file for IIS to allow anonymous authentication to be overridden.

  1. Open the IIS Configuration File (e.g., c:\windows\system32\inetsrv\config\applicationHost.config).

  2. Locate the following anonymousAuthentication section:

    <section name="anonymousAuthentication" overrideModeDefault="Deny" />
     
    
  3. Change the value of overrideModeDefault to "Allow". It is case sensitive.

     

Error: The caller was not authenticated by the service

The most likely scenario with this message is that the identity of the IIS Application Pool for the Experlogix application doesn't have permission to impersonate the caller.

Considerations include:

  • Set the IIS Application Pool identity to a domain user (i.e. DOMAIN\user) rather than Network Service. This user will need access to the Experlogix website and the Experlogix databases. Note this will impact the entire Experlogix site, whether running from the host system or in the service.

  • Set an explicit identity in the web.config file for the service to impersonate. The configuration will look like the following example:

<identity impersonate="true" username="DOMAIN\ADMINUSER" password="PASSWORD" />