tfsaggregator / tfsaggregator-webhooks

WARNING: the team is no more maintaing this version. See aggreggator-cli instead.
https://github.com/tfsaggregator/aggregator-cli
19 stars 22 forks source link

Web Hook Error: Basic authentication requires a secure connection to the server. (500) #27

Closed thoaingan closed 5 years ago

thoaingan commented 6 years ago

Our VSTS Service Hook was working for a while, then it stopped about a week ago (can't find any older history). History showed "Internal Server Error (500)" from our TFS Aggregator Web App. When performing a test, the error displayed is "Basic authentication requires a secure connection to the server. (500)".

Nothing was changed on the Azure Web App side that we know of.

We deleted the web app and service hook subscriptions and re-created everything to no avail.

Please help. Thanks in advance!

image

thoaingan commented 6 years ago

For what it's worth, I installed another VSTS extension called "VSTS Rollup" (https://marketplace.visualstudio.com/items?itemName=canarysautomationspvtltd.vstsrollup#) that works similarly to this extension, using the same exact PAT to authenticate with VSTS, and it works fine.

I turned on logging and found these entries in the Web App application log. The URI that it's complaining about is valid. However, I see that there's an outstanding PR #21 that seems to address this very specific 404 error.

2018-07-23T19:07:43 PID[7472] Error [Critical] 00.088 adb482f4-29c1-44e2-83c0-49fe4d313c2e Exception encountered processing notification: TF31002: Unable to connect to this Team Foundation Server: https://tcb.visualstudio.com/c991f69e-eb96-47c7-b593-4955410ac0db/. Team Foundation Server Url: https://tcb.visualstudio.com/c991f69e-eb96-47c7-b593-4955410ac0db/.

Possible reasons for failure include:

Technical information (for administrator): The remote server returned an error: (404) Not Found. Stack Trace: at Microsoft.TeamFoundation.Client.TfsConnection.EnsureProviderConnected() at Aggregator.Core.Facade.WorkItemRepository..ctor(IRuntimeContext context) at Aggregator.WebHooks.Controllers.WorkItemController.<>c.b__1_1(IRuntimeContext runtimeContext) at Aggregator.Core.Context.RuntimeContext.CreateWorkItemRepository() at Aggregator.Core.Context.RuntimeContext.get_WorkItemRepository() at Aggregator.Core.EventProcessor..ctor(IRuntimeContext runtime) at Aggregator.WebHooks.Controllers.WorkItemController.Post(JObject payload) Inner Exception: The remote server returned an error: (404) Not Found. Stack Trace: at System.Net.HttpWebRequest.GetResponse() at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest webRequest, WebException& webException)

thoaingan commented 6 years ago

I incorporated the changes in PR #21, rebuilt and uploaded the modified DLL to our Web App, and that seems to fix our 404 & 500 errors. Please consider merging PR #21.

giuliov commented 6 years ago

That patch is superseded by the changes in the develop branch. I suggest to consider that version.

elduddz commented 5 years ago

develop is broken, I cannot get it to compile

jessehouwing commented 5 years ago

Tfs-aggregator-webhooks is deprecated.

Tfs-aggregator/develop now contains the latest bits of the webhooks solution.

It requires tfs 2018 update 3 to be installed locally to build.

elduddz commented 5 years ago

👍

elduddz commented 5 years ago

might be interested to know that the "Deploy to Azure" picks the -webhooks project

giuliov commented 5 years ago

We are focusing our energies on https://github.com/tfsaggregator/aggregator-cli as the solution for VSTS/ADO and the cloud