0
저는 ASP.net 코어 2 인 Azure 포털에 응용 프로그램을 게시하고 SSL을 활성화했습니다. 내가 그 응용 프로그램에 대한 컨트롤러 호출을하고있는 중이 야 때 나는 점점 오전WebSocketException 받기 : SSL 사용 asp.net 코어 2 프로젝트에서 컨트롤러 호출을 할 때 원격 서버에 연결할 수 없습니다.
An unhandled exception occurred while processing the request.
WebSocketException: Unable to connect to the remote server
System.Net.WebSockets.WinHttpWebSocket.ThrowOnInvalidConnectState()
WebSocketException: Unable to connect to the remote server
System.Net.WebSockets.WebSocketHandle+<ConnectAsyncCore>d__20.MoveNext()
내 컨트롤러 방법은 다음과 같습니다 스택
public async Task SendAsync(string msg)
{
dynamic newEvent = JsonConvert.DeserializeObject(msg);
TUKUEventSQL newSQLEvent = new TUKUEventSQL();
newSQLEvent.TTID = newEvent.TTID;
newSQLEvent.TTUID = newEvent.TTUID;
newSQLEvent.UTC = newEvent.UTC;
newSQLEvent.Event = newEvent.e;
newSQLEvent.Object = newEvent.o;
newSQLEvent.ObjectId = newEvent.id;
// Trasform
NudestixEvent newDataMartRecord = eventToNudestixTransformer.TransformInputToNudestixEvent(newSQLEvent);
//Send
connection = new HubConnectionBuilder()
.WithUrl($"http://{Request.Host}/chat")
.WithConsoleLogger()
.Build();
await connection.StartAsync();
await connection.InvokeAsync("Send", JsonConvert.SerializeObject(newDataMartRecord));
}
을 그리고 예외 :
WebSocketException: Unable to connect to the remote server
System.Net.WebSockets.WinHttpWebSocket.ThrowOnInvalidConnectState()
System.Net.WebSockets.WinHttpWebSocket+<ConnectAsync>d__18.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult()
System.Net.WebSockets.WebSocketHandle+<ConnectAsyncCore>d__20.MoveNext()
나는 http와 https를 모두 시험해 보았지만 행운은 없었습니다. ( – Joseph
내부에서 같은 컨트롤러 메소드를 호출하고 있습니까? 그럴 것 같은데, 나는 솔직히 이것의 가능한 결과가 무엇인지 모릅니다. –
아니, Azure 함수에서 HTTP 호출이됩니다 – Joseph