0

I have hosted an MVC application in Azure App Service. The application is not creating any problem when i am testing it in local host. I can easily connect to the Dynamics-365 through the SDK and can do easily CRUD operation.

But when i am trying to login which is hosted in Azure it is giving that error though am not getting this error if i restart the app service. If i restart the app service in every morning then i am not getting this error. But i don't want to restart the app service daily.

Here the same question also has been asked but there is not any solution which has been marked as Solved. Time zone difference between client and server has been discussed here but the part which confused me when i am restarting the app service it is working.

How to solve this issue? I am thinking about app service Auto Healing. Should this work?

Any solution would be appreciated.

Thanks in advance.

pcghose
  • 179
  • 16
  • 1
    From your description of Question it looks like connection pool issue. You probably are not closing connection after your transaction is completed. Try force closing connection (threads) that might solve your issue. – AnkUser Aug 28 '19 at 07:04

1 Answers1

1

From your description of Question it looks like connection pool issue. You probably are not closing connection after your transaction is completed. Try force closing connection (threads) that might solve your issue.

OR

The clock on the Server hosting client application was out of sync with the server having the service.

This is almost always because of a server time skew. The remote server and the client's system time must be within (typically) 10 minutes of each other. If they are not, security validation will fail.

I'd check azure service bus and find out what their server time is, and compare that to your server time.

WCF gives an unsecured or incorrectly secured fault error

https://social.msdn.microsoft.com/Forums/vstudio/en-US/ae4172dd-e215-4a72-b927-d164ce4cc318/an-unsecured-or-incorrectly-secured-fault-was-received-from-the-other-party?forum=wcf

AnkUser
  • 5,421
  • 2
  • 9
  • 25
  • So if i restart the app service then the remote server and client's system time is being synced and again it is being mismatched after some time. – pcghose Aug 28 '19 at 07:19