Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

GP Webservices Require a Reset too Often

Posted on by Microsoft Employee

We are using the Dynamics GP web services in our project and we find that over the night the service will not respond anymore and will actually error out.  I have to go into the services and restart the Dynamics Service Host.  Has anyone encountered this as well?  Is there a fix for this?

*This post is locked for comments

  • cnxrmoreland Profile Picture
    cnxrmoreland 10 on at
    RE: GP Webservices Require a Reset too Often

    For the scripts listed, you can modify them to work with Office365 by doing the following:

    First, Generate an encrypted password file by doing the following (in PowerShell):

    Read-Host -Prompt "Enter Password" -AsSecureString | ConvertFrom-SecureString | Out-File "Path"

    *Path is the path to where you want to save the file (ie. c:\temp\pass.txt

    Second, Then you can edit the RestartGPWebService_Email.ps1 file to have the following:

    $AdminName = "email@emailaddress.com"

    $Pass = Get-Content "C:\Conexus\Prod-Scripts\creds.txt" | ConvertTo-SecureString

    $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $AdminName, $Pass

    send-mailmessage -to "to_email@emailaddress.com" -from "from_email@emailaddress.com" -subject "Email Subject goes here" -Body "Email body goes here" -SmtpServer "smtp.office365.com" -UseSsl -Port "587" -Credential $cred

  • DavidMO Profile Picture
    DavidMO 1,030 on at
    RE: GP Webservices Require a Reset too Often

    I hope it helps!

    After Microsoft bailed on fixing this (I still call it a bug) I taught myself just enough PowerShell to generate this solution. It's worked well here for a last few years. Our Web Services outages since are measures in minutes, not days.

    The email piece is not required, it just helps me track the restarts.

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    Beat Bucher GP Gee... 28,021 Super User 2024 Season 1 on at
    RE: GP Webservices Require a Reset too Often

    Thank you David,

    I'm going to check this out and try to implement that on the customer site.. The only thing I might not be able to do is the e-mail notification, as they use Office 365 and already have jobs that fail to authenticate every once in a while when trying to send e-mail notifications  thru the SMTP gateway of O365..

  • Suggested answer
    DavidMO Profile Picture
    DavidMO 1,030 on at
    RE: GP Webservices Require a Reset too Often

    I actually came up with a decent solution to the HRESULT: 0x80070006 (E_HANDLE)) error a few years ago.

    First Microsoft said it was our network causing the issue, then when we paid them to take a look, it was a never-fix GP Web Services bug.

    My solution was a combination of a PowerShell script looking in the event log for that error, and a Windows Scheduler task to kick it off.

    community.dynamics.com/.../error-in-webservice---system-runtime-interopservices-comexception-the-handle-is-invalid-exception-from-hresult-0x80070006-e_handle

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    Beat Bucher GP Gee... 28,021 Super User 2024 Season 1 on at
    RE: GP Webservices Require a Reset too Often

    Thanks Lucas Miller for the input.

    I'm going to check around if I can find a way to track the event logs and catch that type of error messages early in the case this happens again.. I used to have a centralized monitor for critical windows services, but it would be of no help in such situations, as the service isn't really failing.. it just can't communicate anymore with the back-end data server. 

    Have a nice day

  • Verified answer
    Lucas Miller Profile Picture
    Lucas Miller on at
    RE: GP Webservices Require a Reset too Often

    Beat,

    This is something we've been asked about often, but in conversations with the Dynamics GP Dev folks we found out that it is actually an issue with the Authorization Manager (AzMan) functionality that GP Web Services relies on that fails when the connection to the security store (e.g. a SQL Server instance) is lost.  So, there really isn't anything that can be patched.

    At one time there was a Product Suggestion entered around this, so the Product Group was made aware of it, but this would require a larger change than just GP Web Services.

    I know some customers are using a workaround that involves an automated task that checks for the "Handle is invalid" error that signifies the issue and restarts the GP Service Host service in response.

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    Beat Bucher GP Gee... 28,021 Super User 2024 Season 1 on at
    RE: GP Webservices Require a Reset too Often

    I don't know if that issue was fixed with a patch.. but I'd hope so at least in GP 2018...

    I have customer running GP 2016 and using GP Web Services on a dedicated app server for CRM on-Prem to make calls to the GP back-end.. every once in a while the integration stops working and we have to restart the GP Web Services on the app server..

    Last week the SQL back-end server was rebooted due to windows updates applied, but the other systems did not.. guess what, the integration stopped working and we didn't realized that the GP Web Services had lost connectivity with the SQL back-end due to the reboot.. This is very annoying, because you don't get any helpful messages to track down the issue..

  • RE: GP Webservices Require a Reset too Often

    Hello,

    Any idea if this was fixed by a recent patch?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: GP Webservices Require a Reset too Often

    We recently upgraded to GP 2016 web services and we're still getting this same issue once in a while.  Our workaround for now is to just restart the service.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: GP Webservices Require a Reset too Often

    This is a known issue with GP 2010 Web Services. We have seen the same for many customers. We end up scheduling a daily reset of Web Services until MS resolve this.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans