-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem using https address #2
Comments
Are you sure the problem is in the A .net core app in the VS The 502 error can also mean that the nginx accepted your request, but the proxied node.js server failed to process it. |
Here is the jsreport log, it actually received the request and process the PDF, somehow the response cannot get back to .NET app. In .net, it still shows error 502.
Here is my NGINX setting.
|
I confirm it's not dependency issue, more like a request issue. I make a test function in the library. It works fine.
I then test using the same request string, then RenderByNameAsync works fine. Seems it's me passing the wrong data object, I will keep you updated. |
There is a "options" key in the request which results in 502 Bad Gateway, if I remove "Options", it works fine. I tested in both PostMan and .Net. Any ideas? (If I set "logsToResponseHeader" to false, it works) "options" is added by RenderByNameAsync. Working Request: (status 200)
Not Working Request: (Status 502)
|
2 solutions now.
At this point it's not a bug per say, I'm suggesting changing RenderByNameAsync debug option logsToResponseHeader to false by default or change your documentation about Nginx configuration. |
Yes, we will completely remove the |
I'm using https address for ReportingService. I'm hosting a http jsreport server on this address with nginx/certbot (using your suggested config)
The address works perfectly fine with PostMan. I send post request to https://xxx.xxx.xx/api/report/, it gives me 200 with PDF binary.
But when I use client in .NET.
It give me this error:
I then try to use raw https call using .NET.
This is the response:
It seems to be httpClient TLS version issue. Check here: https://stackoverflow.com/questions/22251689/make-https-call-using-httpclient
in jsreport-dotnet-client, it's using
Assembly netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
I'm using
Assembly System.Net.Http, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Old version of httpClient seems not supporting TLS 1.1+.
My server is using 1.2+ only.
Currently I have to use custom method, hope you can fix it soon. A simple dependency update should solve the problem.
The text was updated successfully, but these errors were encountered: