Community
Showing results for 
Search instead for 
Do you mean 
Reply

Webhooks 500 Error

New Member
Posts: 3
Country: United_Kingdom

Webhooks 500 Error

[ Edited ]

I've been directed here by Act support.

 

I'm currently encountering a 500 error when using the webhook endpoint.

 

Request headers: Content-Type: application/json , Authorization: Bearer ...
Response: 500 Internal Server Error
Exception message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
    [exceptionType] => System.Data.SqlClient.SqlException
    [stackTrace] =>    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<Open>b__36(DbConnection t, DbConnectionInterceptionContext c)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
   at System.Data.Entity.Core.EntityClient.EntityConnection.<Open>b__2()
   at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
   at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
   at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation)
   at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
 
I've been following the documentation from:
Moderator
Posts: 809
Country: USA

Re: Webhooks 500 Error

Somehow this was marked as spam, so I'm not sure what's going on there.

 

Have you followed all instructions for setting up Act! for Web?  Have you created the impersonation user and added the databases in the Web Administration menus?

 

 

Billy Clark
Swiftpage
Act! Knowledgebase: http://kb.act.com
New Member
Posts: 3
Country: United_Kingdom

Re: Webhooks 500 Error

This is an existing system that we've inherited as developers, as its hosted with Act we were under the impression that server / database would be managed by them as well and that the system would already be setup to use the API.

Moderator
Posts: 809
Country: USA

Re: Webhooks 500 Error

My fault. I should have paid more attention to the request URL, as that is one of ours.

 

I've asked for some help from development on if this is something they've seen before, but I can see the SQL server is functioning correctly.

 

Billy Clark
Swiftpage
Act! Knowledgebase: http://kb.act.com
New Member
Posts: 3
Country: United_Kingdom

Re: Webhooks 500 Error

Is there any update on this?

Moderator
Posts: 809
Country: USA

Re: Webhooks 500 Error

[ Edited ]

I've made the request with development again.

 

Most questions on the API I can resolve by attempting this locally, resolving that issue, and echoing my results to you.  I don't have much information on the webhooks portion of the API, and my own attempts to use them come up with a similar error.  I'm going to walk over to development and see if I can get any information.

 

The dev I want to speak with is not in the office yet, but I've left notice that I want to speak with him about this, and I've emailed him.  It looks like the issue revolves around a user in SQL:

 
"message": "Login failed for user 'ACTWEBHOOKS'.",
  "exceptionMessage": "Login failed for user 'ACTWEBHOOKS'.",
  "exceptionType": "System.Data.SqlClient.SqlException",

 

 
Billy Clark
Swiftpage
Act! Knowledgebase: http://kb.act.com
Moderator
Posts: 809
Country: USA

Re: Webhooks 500 Error

Okay, so the WebHooks functionality requires the Act! Webhooks service to be active on the server.  We are not running the webhooks service on our cloud service, and will not be turning that on in the immediate future.

 

Thanks for your patience on this issue.  This is a new one on me, and I'll make sure support has more information on this going forward.

Billy Clark
Swiftpage
Act! Knowledgebase: http://kb.act.com