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.
I'll see if this helps and post back.
Thank you!!
Thanks for the information.
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.
Nothing was recorded in the Exceptions console.
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
What does the exceptions console show?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156