web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

GP Web Services Tracing?

(0) ShareShare
ReportReport
Posted on by 1,588

I am wanting to know if there is additional tracing available for GP Web Services. I have already turned on logging as described by Chapter 10 of the WS Install/Admin Guide. I noticed there is a switch in the DynamicsSecurity.config file named ApplicationTraceSwitch. I cannot find any documenation on this switch. 

The problem I am trying to solve is a client attempting to call GP Web Services and receiving the response "The caller was not authenticated by the service". After turning on logging for both endpoints we did not receive any log entry when the other party attempted their call to the service. I want to interpret that as their call not making it to GP Web Services, but I don't know what else would be between them and the web service.

Categories:
I have the same question (0)
  • Tim Andaya Profile Picture
    670 on at

    What does the exceptions console show?

  • Suggested answer
    Derek Albaugh Profile Picture
    on at

    The Web Services Exceptions Console and Event Viewer logs, specifically the 'Dynamics' log is where I'd start first, as usually if there's nothing in either of those, it may not be an actual Web Services issue.

    In regards to the tracing you mentioned, I think this may be it:

    There is some tracing we can use to try and identify what is causing this to occur. To enable this tracing, we need to do the following:

    1. On the Web Services server, browse to C:\Program Files\Microsoft Dynamics\GPWebServices\ServiceConfigs\ directory, make a backup of the DynamicsGP.config file.

    2. Open the original DynamicsGP.config file and right after this section:

    <system.diagnostics>

       <switches>

         <add name="ApplicationTraceSwitch" value="0"/>

       </switches>

       <trace autoflush="true" indentsize="4">

         <listeners>

           <add name="dynamicsListener"/>

         </listeners>

       </trace>

       <sources>

         <source name="System.ServiceModel" switchValue="" propagateActivity="true">

           <!--Values can be:msdn.microsoft.com/.../ms733025.aspx -->

           <listeners>

             <add name="wcfListener"/>

           </listeners>

         </source>

         <source name="System.IO.Log">

           <listeners>

             <add name="wcfListener"/>

           </listeners>

         </source>

         <source name="System.Runtime.Serialization">

           <listeners>

             <add name="wcfListener"/>

           </listeners>

         </source>

         <source name="System.IdentityModel">

           <listeners>

             <add name="wcfListener"/>

           </listeners>

         </source>

    Add this section:

    <source name="eConnectTraceSource" switchValue="Verbose">

           <listeners>

             <add name="eConnectXmlTracelistener">

               <filter type="" />

             </add>

             <add name="eConnectTextTracelistener">

               <filter type="" />

             </add>

           </listeners>

         </source>

         <source name="eConnectServiceTraceSource" switchValue="Verbose">

           <listeners>

             <add name="eConnectSvcTextTracelistener">

               <filter type="" />

             </add>

             <add name="eConnectSvcXmlTracelistener">

               <filter type="" />

             </add>

           </listeners>

         </source>

    This would come right before this section:

       </sources>

       <sharedListeners>

         <add name="wcfListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\Program Files\Microsoft Dynamics\GPWebServices\Logs\Tracing\GPWebServices.svclog"/>

         <add name="dynamicsListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="C:\Program Files\Microsoft Dynamics\GPWebServices\Logs\Tracing\GPWebServices.log"/>

       </sharedListeners>

     </system.diagnostics>

    </configuration>

    3. Right after this section in the same config file:

       <sharedListeners>

         <add name="wcfListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\Program Files\Microsoft Dynamics\GPWebServices\Logs\Tracing\GPWebServices.svclog"/>

         <add name="dynamicsListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="C:\Program Files\Microsoft Dynamics\GPWebServices\Logs\Tracing\GPWebServices.log"/>

    ....and right before the end of the config file:

    </sharedListeners>

     </system.diagnostics>

    </configuration>

    Add this:

    <add initializeData="C:\Program Files\Microsoft Dynamics\GPWebServices\Logs\Tracing\eConnectSvc.log" type="System.Diagnostics.TextWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

           name="eConnectSvcTextTracelistener">

           <filter type="" />

         </add>

         <add initializeData="C:\Program Files\Microsoft Dynamics\GPWebServices\Logs\Tracing\eConnectSvcLog.xml" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

           name="eConnectSvcXmlTracelistener">

           <filter type="" />

         </add>

         <add initializeData="C:\Program Files\Microsoft Dynamics\GPWebServices\Logs\Tracing\eConnect.log" type="System.Diagnostics.TextWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

         name="eConnectTextTracelistener">

           <filter type="" />

         </add>

         <add initializeData="C:\Program Files\Microsoft Dynamics\GPWebServices\Logs\Tracing\eConnectLog.xml" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

           name="eConnectXmlTracelistener">

           <filter type="" />

         </add>

    4. You’ll need to stop and restart the ‘Microsoft Dynamics GP Service Host’ service for changes to go through, and also the user account running this service must have ‘Full Control’ of the C:\Program Files\Microsoft Dynamics\GPWebServices\ folder.

    5. Reproduce the issue with the Web Services then look for the files generated under the C:\Program Files\Microsoft Dynamics\GPWebServices\Logs\Tracing\ folder.  

    6. After troubleshooting, you can change the config file back to the way it was, so you don't bog down your system with ongoing logs, and restart the service again for changes to take effect.

    Thanks

  • chadbruels Profile Picture
    1,588 on at

    Nothing was recorded in the Exceptions console.

  • chadbruels Profile Picture
    1,588 on at

    Thanks, Derek. I might have to explore these tracing options on my own at a later time.

    The issue ended up being solved by the third party recognizing they had two places in their application's config file for specifying a User to authenticate with the web service. In one place they had the correct <domain>\<user> specified. However, in the second place they had a different user without any domain. They updated that second key-value pair to match the first and their call to the GP Web Service worked correctly.

    The only remaining curiosity to me is why the service logging did not record a failed access attempt.

  • Suggested answer
    Derek Albaugh Profile Picture
    on at

    Thanks for the information.

  • Tim Andaya Profile Picture
    670 on at

    I'll see if this helps and post back.

    Thank you!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans