Good day. I know that this question is already ask before. But i can't really make this thing work.
I am using Visual Studio 2017
I am following a tutorial on how to Build an app with Asp.net core and angular
My problem is i can't send request to the site using postman.
I have read the answers from the link below but all of them is not working
"Could not get any response" response when using postman with subdomain
This is my launchSettings.json
"DatingApp.API": {
"commandName": "Project",
"launchBrowser": false,
"launchUrl": "api/values",
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
When i run the API
(https://localhost:5000/api/values) and send request using Postman.
It give's me error
And i'm also receiving error in the Visual Studio Output window
Microsoft.AspNetCore.Server.Kestrel:Information: Connection id "0HLHTBLQGR6JP" bad request data: "Invalid request line: '\x16\x03\x01\x01\x01\x01\x00\x00\xFD\x03\x03e*\xD2K\x9C\xA5\x99\xAA\xB4.\x0C+\x8F\xE2\xFF\xB6$\x05\xDA\xA4\xD5a\xBD\x1Fx\xBB\x18\xF6\xE5\xD5fO\x00\x00n\xC0/\xC0+\xC00\xC0,\x00\x9E\xC0'\x00g\xC0(\x00k\xC0$\xC0\x14\xC0\x0A'"
Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Invalid request line: '\x16\x03\x01\x01\x01\x01\x00\x00\xFD\x03\x03e*\xD2K\x9C\xA5\x99\xAA\xB4.\x0C+\x8F\xE2\xFF\xB6$\x05\xDA\xA4\xD5a\xBD\x1Fx\xBB\x18\xF6\xE5\xD5fO\x00\x00n\xC0/\xC0+\xC00\xC0,\x00\x9E\xC0'\x00g\xC0(\x00k\xC0$\xC0\x14\xC0\x0A'
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser`1.RejectRequestLine(Byte* requestLine, Int32 length)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser`1.GetUnknownMethod(Byte* data, Int32 length, Int32& methodLength)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser`1.ParseRequestLine(TRequestHandler handler, Byte* data, Int32 length)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser`1.ParseRequestLine(TRequestHandler handler, ReadOnlySequence`1& buffer, SequencePosition& consumed, SequencePosition& examined)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpParser`1.Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.IHttpParser<TRequestHandler>.ParseRequestLine(TRequestHandler handler, ReadOnlySequence`1& buffer, SequencePosition& consumed, SequencePosition& examined)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.TakeStartLine(ReadOnlySequence`1 buffer, SequencePosition& consumed, SequencePosition& examined)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.ParseRequest(ReadOnlySequence`1 buffer, SequencePosition& consumed, SequencePosition& examined)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.TryParseRequest(ReadResult result, Boolean& endConnection)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequestsAsync[TContext](IHttpApplication`1 application)
But when i run the program using IIS Express. it works and i can send request using the Postman.
What's wrong with my code?