Hi, I deployed my Abp project (UI:Blazor Wasm) on Nginx Ubuntu. Blazor UI and Api run well, only a problem with authentication. If I leave appsetting.json of Api as default: "AuthServer": { "Authority": "https://ebiz-devapi.abc.com", "RequireHttpsMetadata": "true", "SwaggerClientId": "eBiz_Swagger_Ubuntu" } When login it show this error: If I changed RequireHttpsMetadata to false and Auth Server Url withou https, when Blazor login will show this error and cannot login:
Please help me to fix this issue. Thanks Dharma
19 Answer(s)
-
0
hi
Please share the logs of
400
error.You should use
https
.liming.ma@volosoft.com
-
0
hi
Can you set the log level to
Debug
and share the logs.txt file?Thanks
public async static Task<int> Main(string[] args) { Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() .Enrich.FromLogContext() .WriteTo.Async(c => c.File("Logs/logs.txt")) .WriteTo.Async(c => c.Console()) .CreateLogger();
-
0
Hi, I deployed my project to nginx on ubuntu for both Blazor and Api. It didn't record log to Logs folder in side Api folder. I have sent the log file (configured in conf of nginx) to your email. Thanks, Dharma
-
0
hi
Please set the log level to Debug and share the logs of AuthServer and API website.
-
0
I changed log level as you advised and sent the log to you already. Thanks, Dharma
-
0
hi hanntd
There is no help info in your logs.
Please write the logs to
logs.txt
and share the logs ofhttps://ebiz-devapi.abc.com
website.Thanks
-
0
hi
Hi Maliming, When hosting on ubuntu (nginx) I didn't find any log file in side Logs of HttpApi.Host, I can only get the log file from /log/nginx/... so I cannot get the logs.txt as you mentioned Thanks
Please share the
Program.cs
of your ebiz-devapi.abc website. -
0
I have sent Program.cs to your email. Thanks.
-
0
-
0
hi
System.IO.FileNotFoundException: Signing Certificate couldn't found: /var/www/ebiz/api/authserver.pfx
Please check the file.
MessageText: relation "AbpBackgroundJobs" does not exist
Have you change the
TablePrefix
? -
0
-
0
ok, Please remove the
logs.txt
and restart the website, then share the logs again. Thanks -
0
hi
Let me check it remotely. Thanks Join and share your screen. https://us05web.zoom.us/j/85451578578?pwd=vb4VkbCXwW0IIh2GaBAriuIHoG6g5c.1
-
0
-
0
Hi, Sorry, I'm in the meeting so I cannot join Zoom to share screen for your right now. I already changed Log Level to debug and resend the log to your email. Thanks, Dharma
-
0
hi
The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was marked as rejected by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+ValidateTransportSecurityRequirement.
Request starting HTTP/1.1 GET http:// ebiz-devapi.hqsoft.vn/connect/authorize?response_t
- use https for your websites.
Configure<OpenIddictServerAspNetCoreBuilder>(configure => { configure.DisableTransportSecurityRequirement(); });
-
0
-
0
hi
The URL in your logs is http
Request starting HTTP/1.1 GET http://ebiz-devapi.hqsoft.vn/connect/authorize?response_t
Please check your Nginx configuration.
You can add a middleware to set the
Scheme
tohttps
in your websites.https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-7.0#when-it-isnt-possible-to-add-forwarded-headers-and-all-requests-are-secure
-
0
Thanks Maliming, Finally, I resolved my problem by fixing nginx configuration as you advised. Thanks, Dharma