Hi, I have build the docker-compose to run the project but after logging to the app, the angular site is request to api server by api: http://localhost:44399/api/abp/application-configuration?includeLocalizationResources=false and got the issue below (server status is 500):
System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'http://localhost:44395/.well-known/openid-configuration'.
---> System.IO.IOException: IDX20804: Unable to retrieve document from: 'http://localhost:44395/.well-known/openid-configuration'.
---> System.Net.Http.HttpRequestException: Cannot assign requested address (localhost:44395)
---> System.Net.Sockets.SocketException (99): Cannot assign requested address
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter
1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.SendAsyncAndRetryOnNetworkError(HttpClient httpClient, Uri uri)
at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel)
--- End of inner exception stack trace ---
at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel)
at Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfigurationRetriever.GetAsync(String address, IDocumentRetriever retriever, CancellationToken cancel)
at Microsoft.IdentityModel.Protocols.ConfigurationManager1.GetConfigurationAsync(CancellationToken cancel) --- End of inner exception stack trace --- at Microsoft.IdentityModel.Protocols.ConfigurationManager
1.GetConfigurationAsync(CancellationToken cancel)
at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<
My docker compose:
version: '3.7'
services: backoffice-angular: image: aa.core/backoffice-angular:latest container_name: backoffice-angular build: context: ../angular/ dockerfile: Dockerfile ports: - "4200:80" depends_on: - backoffice-api networks: - abp-network
backoffice-api: image: aa.core/backoffice-api:latest container_name: backoffice-api hostname: backoffice-api build: context: . dockerfile: ./src/AA.Core.BackOffice.HttpApi.Host/Dockerfile ports: - "44399:80" restart: on-failure volumes: - type: bind source: ${USERPROFILE}/.abp/cli/ target: /root/.abp/cli/ networks: - abp-network
backoffice-authserver: image: aa.core/backoffice-authserver:latest container_name: backoffice-authserver build: context: ../aspnet-core/ dockerfile: src/AA.Core.BackOffice.AuthServer/Dockerfile ports: - "44395:80" depends_on: mongodb: condition: service_healthy redis: condition: service_healthy volumes: - type: bind source: ${USERPROFILE}/.abp/cli/ target: /root/.abp/cli/ restart: on-failure networks: - abp-network
db-migrator: image: aa.core/backoffice-db-migrator:latest container_name: db-migrator build: context: ../aspnet-core/ dockerfile: src/AA.Core.BackOffice.DbMigrator/Dockerfile depends_on: mongodb: condition: service_healthy volumes: - type: bind source: ${USERPROFILE}/.abp/cli/ target: /root/.abp/cli/ networks: - abp-network
mongodb: container_name: mongodb image: mongo:4.2 ports: - "27017:27017" volumes: - mongodb_data:/data/db networks: - abp-network healthcheck: test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet interval: 10s timeout: 10s retries: 10
redis: container_name: redis image: redis:alpine ports: - "6379:6379" networks: - abp-network healthcheck: test: [ "CMD", "redis-cli","ping" ]
volumes: mongodb_data: name: backoffice_mongodb_data networks: abp-network: name: backoffice-network driver: bridge
ABP Framework version: v7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): Yes Exception message and full stack trace: [Provide any relevant details] Steps to reproduce the issue:
Hi, I want to customize the 'Add New User' form while keeping the other functions on this user page unchanged. I tried using the replace component, but it replaced the entire UI on this page. I only want to customize the 'Add New User' form. Please help.
ABP Framework version: v7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): Yes Exception message and full stack trace: [Provide any relevant details] Steps to reproduce the issue:
hi,
I want to create a custom audit log for a client. How can I reuse the audit log on the settings page? Also, I want to filter the audit log by client ID, but the input for getting the audit log does not have a client property. Please help me with that.
ABP Framework version: v.7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): yes Exception message and full stack trace: Steps to reproduce the issue:
hi,
how can I access to source code on this page: https://x.leptontheme.com/side-menu/index.html
thanks
Hi,
I encountered an exception when setting data in Redis. Could you please help me with this?
My code:
private readonly IDistributedCache<RouteHistoryModeDto, string> _robotRouteHistoryCache;
// save to cache
await _robotRouteHistoryCache.SetAsync(string.Format(RouteHistoryConsts.CacheRouteHistoryModeKey, robot.Code),
new RouteHistoryModeDto
{
RouteHistoryId = routeHistory.Id,
ControlMode = routeHistory.ControlMode,
OperationMode = routeHistory.OperationMode,
DateTime = routeHistory.DateTime,
Odometer = routeHistory.Odometer,
TravelDistance = nextTravelDistance,
TravelTakenTime = nextTravelTakenTime
});
StackExchange.Redis.RedisConnectionException: No connection (requires writable - not eligible for replica) is active/available to service this operation: EXPIRE c:AA.Core.BackOffice.RouteHistories.RouteHistoryModeDto,k:BackOffice:route-history-mode-bulldog015f899b, mc: 1/1/0, mgr: 10 of 10 available, clientName: localhost(SE.Redis-v2.6.122.38350), IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=2,Free=32765,Min=8,Max=32767), POOL: (Threads=7,QueuedItems=0,CompletedItems=488495,Timers=36), v: 2.6.122.38350
at StackExchange.Redis.ConnectionMultiplexer.ThrowFailed[T](TaskCompletionSource`1 source, Exception unthrownException) in //src/StackExchange.Redis/ConnectionMultiplexer.cs:line 2039
StackExchange.Redis.RedisConnectionException: No connection (requires writable - not eligible for replica) is active/available to service this operation: EXPIRE c:AA.Core.BackOffice.RobotErrors.RobotError,k:BackOffice:robot-error-bulldog015f899b, mc: 1/1/0, mgr: 10 of 10 available, clientName: localhost(SE.Redis-v2.6.122.38350), IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=2,Free=32765,Min=8,Max=32767), POOL: (Threads=7,QueuedItems=0,CompletedItems=488947,Timers=37), v: 2.6.122.38350
at StackExchange.Redis.ConnectionMultiplexer.ThrowFailed[T](TaskCompletionSource`1 source, Exception unthrownException) in //src/StackExchange.Redis/ConnectionMultiplexer.cs:line 2039
ABP Framework version: v7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): Yes Exception message and full stack trace: [Provide any relevant details] Steps to reproduce the issue:
Hi,
Sometimes, the server returns the message 'An internal error occurred during your request!' and I need to open the log to check the error details. How can I set up the response to return the error message details and only for the development environment?
ABP Framework version: v7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): Yes Exception message and full stack trace: [Provide any relevant details] Steps to reproduce the issue:
hi,
How can I access the Lepton theme in Figma?
ABP Framework version: v7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): Yes Exception message and full stack trace: [Provide any relevant details] Steps to reproduce the issue:
hi,
I have added a new application to OpenIddict using this URL: domain.com/openiddict/Applications. I successfully used the client ID and client secret to obtain a token. However, when I call the API from Postman with that token, my request is not saved in the audit log. I have enabled audit logging, but it still does not work. Please help me.
ABP Framework version: v7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): Yes Exception message and full stack trace: [Provide any relevant details] Steps to reproduce the issue:
Hello,
I have added the ApiKeyMiddleware to filter the API and ensure that the request has the necessary API key to pass. In the InvokeAsync method, how can I inject the IPartnersAppService to retrieve the partner from the database for verification?
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace AA.Core.BackOffice;
public class ApiKeyMiddleware
{
private readonly RequestDelegate _next;
private const string APIKEY = "key";
private readonly ILogger _logger;
public ApiKeyMiddleware(RequestDelegate next, ILoggerFactory loggerFactory)
{
_next = next;
_logger = loggerFactory.CreateLogger<ApiKeyMiddleware>();;
}
public async Task InvokeAsync(HttpContext context) {
await LogRequestBody(context);
if (!context.Request.Query.TryGetValue(APIKEY, out
var extractedApiKey)) {
context.Response.StatusCode = 401;
await context.Response.WriteAsync("Api Key was not provided ");
return;
}
var appSettings = context.RequestServices.GetRequiredService < IConfiguration > ();
var apiKey = appSettings.GetValue < string > ("App:AhamoveApiKey");
if (apiKey == null || !apiKey.Equals(extractedApiKey)) {
context.Response.StatusCode = 401;
await context.Response.WriteAsync("Unauthorized");
return;
}
await _next(context);
}
private async Task LogRequestBody(HttpContext context)
{
context.Request.EnableBuffering();
string requestBody = await new StreamReader(context.Request.Body, Encoding.UTF8).ReadToEndAsync();
context.Request.Body.Position = 0;
_logger.LogInformation("Request Body: {RequestBody}", requestBody);
}
}
ABP Framework version: v.7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): yes Exception message and full stack trace: Steps to reproduce the issue:
Hi,
I'm working on Vue.js and I want to send a request to log in. The flow is to send the username and password, and then return the token to access data. Does this flow already exist, or do I need to implement a new grant type for it? If it exists, please help me activate it.
ABP Framework version: v7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): Yes Exception message and full stack trace: [Provide any relevant details] Steps to reproduce the issue: