I am currently working on a REST API to be able to call a WCF service via it. Now I have the problem when I try to call up tasks via Azure DevOps using this method,
<OperationContract()>
<WebGet(UriTemplate:="/todos?user={sUser}&projectID={lProjektID}", BodyStyle:=WebMessageBodyStyle.Wrapped, RequestFormat:=WebMessageFormat.Json, ResponseFormat:=WebMessageFormat.Json)>
Function GetTodos(Optional ByVal sUser As String = "%", Optional ByVal lProjektID As Long = Nothing) As List(Of ProjektToDo)
I get these exceptions after trying to connect to Azure Devops at this:
Dim creds As New VssBasicCredential(String.Empty, _DevOpsPAT)
Dim connection As VssConnection = New VssConnection(New Uri(My.Settings.TFSBasisUrlSSL), creds)
'Create instance of WorkItemTrackingHttpClient using VssConnection
Dim witClient As WorkItemTrackingHttpClient = connection.GetClient(Of WorkItemTrackingHttpClient) 'This connection fails !'
Dim queryHierarchyItems As List(Of QueryHierarchyItem) = witClient.GetQueriesAsync(Projekt,, 2).Result
- "System.Net.Sockets.SocketException" in System.dll
- "System.IO.IOException" in System.dll
- "System.ObjectDisposedException" in System.dll
- "System.Net.WebException" in System.dll
- "System.Net.Http.HttpRequestException" in Microsoft.VisualStudio.Services.Common.dll
- "System.Net.Http.HttpRequestException" in mscorlib.dll.
- The InnerException of the ex.Message tells me "An existing connection was closed by the remote host" Message: "Unable to read data from the transfer connection". I'm currently training in a new company and have no experience in the area of Rest API and WCF Service, please help me I'm desperate about this task because I just don't know where to start.