Hi,
We implemented the Blazor WebAssembly app as a SaaS model in microservice template.
And able load the all the services Swagger UI like Admin Service, SaaS Service but Web Gateway Swagger not loading
If you're creating a bug/problem report, please include followings:
- ABP Framework version: v7.2.2
- UI type: Blazor WebAssembly
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace:
- Steps to reproduce the issue:"
36 Answer(s)
-
0
Hi,
Not found
You can see the web gateway response
404
code, you should check that the gateway is correctly forwarding the request.You can create an empty microservice template to compare the gateway project config.
Swagger:
You can try :
Please also add the
AbpSwashbuckleModule
to the module depends. -
0
-
0
Hi,
Can you share a project that can reproduce the problem with me? shiwei.liang@volosoft.com I will check it.
-
0
Hi,
I uploading the source code and sent a link to your email. please check it.
-
0
-
0
-
0
Can you share the
ocelot.json
file content? -
0
Can you share the
ocelot.json
file content?Here it is, web gateway ocelot.json
{ "GlobalConfiguration": { "BaseUrl": "https://localhost:44325", "RequestIdKey": "OcRequestId" }, "Routes": [ { "ServiceKey": "Account Service", "DownstreamPathTemplate": "/api/account/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44322 } ], "UpstreamPathTemplate": "/api/account/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Identity Service", "DownstreamPathTemplate": "/api/identity/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44388 } ], "UpstreamPathTemplate": "/api/identity/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "OpenId Service", "DownstreamPathTemplate": "/api/openiddict/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44388 } ], "UpstreamPathTemplate": "/api/iopeniddict/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Identity Service", "DownstreamPathTemplate": "/api/account-admin/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44388 } ], "UpstreamPathTemplate": "/api/account-admin/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Saas Service", "DownstreamPathTemplate": "/api/saas/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44381 } ], "UpstreamPathTemplate": "/api/saas/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Payment Service", "DownstreamPathTemplate": "/api/payment/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44381 } ], "UpstreamPathTemplate": "/api/payment/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Administration Service", "DownstreamPathTemplate": "/api/abp/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44367 } ], "UpstreamPathTemplate": "/api/abp/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Administration Service", "DownstreamPathTemplate": "/api/audit-logging/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44367 } ], "UpstreamPathTemplate": "/api/audit-logging/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Administration Service", "DownstreamPathTemplate": "/api/language-management/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44367 } ], "UpstreamPathTemplate": "/api/language-management/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Administration Service", "DownstreamPathTemplate": "/api/text-template-management/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44367 } ], "UpstreamPathTemplate": "/api/text-template-management/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Administration Service", "DownstreamPathTemplate": "/api/feature-management/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44367 } ], "UpstreamPathTemplate": "/api/feature-management/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Administration Service", "DownstreamPathTemplate": "/api/permission-management/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44367 } ], "UpstreamPathTemplate": "/api/permission-management/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Administration Service", "DownstreamPathTemplate": "/api/setting-management/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44367 } ], "UpstreamPathTemplate": "/api/setting-management/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Administration Service", "DownstreamPathTemplate": "/api/lepton-theme-management/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44367 } ], "UpstreamPathTemplate": "/api/lepton-theme-management/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Core Service", "DownstreamPathTemplate": "/api/core-service/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44365 } ], "UpstreamPathTemplate": "/api/core-service/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Messaging Service", "DownstreamPathTemplate": "/api/messaging-service/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44358 } ], "UpstreamPathTemplate": "/api/messaging-service/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Chat Service", "DownstreamPathTemplate": "/api/chat/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44358 } ], "UpstreamPathTemplate": "/api/chat/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Signalr Service", "DownstreamPathTemplate": "/signalr-hubs/{everything}", "DownstreamScheme": "wss", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44358 } ], "UpstreamPathTemplate": "/signalr-hubs/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "IT Service", "DownstreamPathTemplate": "/api/i-t-service/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44363 } ], "UpstreamPathTemplate": "/api/i-t-service/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Report Service", "DownstreamPathTemplate": "/api/report-service/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 45231 } ], "UpstreamPathTemplate": "/api/report-service/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Document Service", "DownstreamPathTemplate": "/api/document-service/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44478 } ], "UpstreamPathTemplate": "/api/document-service/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "File Management", "DownstreamPathTemplate": "/api/file-management/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44478 } ], "UpstreamPathTemplate": "/api/file-management/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] }, { "ServiceKey": "Work Service", "DownstreamPathTemplate": "/api/work-service/{everything}", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "localhost", "Port": 44371 } ], "UpstreamPathTemplate": "/api/work-service/{everything}", "UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ] } ]
} -
0
-
0
-
0
Try:
app.UseSwaggerUI(options => { var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>(); var routes = configuration.GetSection("Routes").Get<List<OcelotConfiguration>>(); var routedServices = routes .GroupBy(t => t.ServiceKey) .Select(r => r.First()) .Distinct(); foreach (var config in routedServices.OrderBy(q => q.ServiceKey)) { if (config.DownstreamHostAndPorts != null && config.DownstreamScheme != "wss") { var url = $"{config.DownstreamScheme}://{config.DownstreamHostAndPorts.FirstOrDefault()?.Host}:{config.DownstreamHostAndPorts.FirstOrDefault()?.Port}"; if (!env.IsDevelopment()) { url = $"https://{config.DownstreamHostAndPorts.FirstOrDefault()?.Host}"; } options.SwaggerEndpoint($"{url}/swagger/v1/swagger.json", $"{config.ServiceKey} API"); } options.RoutePrefix = string.Empty; options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]); } });
-
0
-
0
redirect_uri is not valid for client application
You should check the client application's
redirect_uri
.You can edit the application through OpenId UI
-
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0
-
0
Hi,
if you want i will share my latest code with you what i have currently.
-
0
Hi,
Unfortunately, I don't know what's happened, can you make a GIF or record a video? Thanks.
if you want i will share my latest code with you what i have currently.
Yes, please also share it.
-
0
Hi,
I just shared the source code to shiwei.liang@volosoft.com.
you can check now.