Custom Vision C# Prediction API gives HttpRequestException
Hello community,
I have a Custom Vision project trained and published and im trying to use it with the Prediction API (https://video2.skills-academy.com/en-us/azure/cognitive-services/custom-vision-service/use-prediction-api). I had it working before but suddenly the red line always throws a HttpRequestException and i cant figure out why. I tried using different accounts, projects and internet connections. Does anyone have an idea on what could be causing this problem?
Exception thrown: 'System.Net.Http.HttpRequestException' in mscorlib.dll
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at CVSPredictionSample.Program.<MakePredictionRequest>d__1.MoveNext() in <path>\CustomVisionPrediction.cs:line 41
Thanks in advance!