Thanks @maliming
We changed the settings in SQL Server and afterwards the creation of tenants works fine.
If you're creating a bug/problem report, please include followings:
* 2021-09-27 15:07:52.868 -04:00 [ERR] An exception occurred while iterating over the results of a query for context type 'Galac.Tickets.EntityFrameworkCore.TicketsDbContext'.
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
---> System.ComponentModel.Win32Exception (258): The wait operation timed out.
at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__169_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
ClientConnectionId:9576df5a-9316-491c-8681-bb8966ab348c
Error Number:-2,State:0,Class:11
Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
---> System.ComponentModel.Win32Exception (258): The wait operation timed out.
at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__169_0(Task`1 result)
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
ClientConnectionId:9576df5a-9316-491c-8681-bb8966ab348c
Error Number:-2,State:0,Class:11
Thanks @EngincanV It's Works for Us.
Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
If you're creating a bug/problem report, please include followings:
Thanks @maliming, problem was solved. It was reletated to activate TLS protocols on the server.
hi @maliming yes, i can share my screen. I send you an email.
Hi maliming.
This is appsetting.json
from API
{
"App": {
"SelfUrl": "https://api.server.com:51114",
"ClientUrl": "https://front.server.com:51113",
"CorsOrigins": "https://.server.com,https://front.server.com:51113,https://api.server.com:51114"
},
"ConnectionStrings": {
"Default": "Data Source=XXXX-01;Initial Catalog=TicketsADB;Integrated Security=True"
},
"AuthServer": {
"Authority": "https://api.server.com:51114",
"RequireHttpsMetadata": "false"
},
"StringEncryption": {
"DefaultPassPhrase": "XXXXXX0frz1ifcLs"
},
"Settings": {
"Volo.Abp.LeptonTheme.Style": "Style1", / Options: Style1, Style2... Style6 /
"Volo.Abp.LeptonTheme.Layout.MenuPlacement": "Left", / Options: Left, Top /
"Volo.Abp.LeptonTheme.Layout.MenuStatus": "AlwaysOpened", / Options: AlwaysOpened, OpenOnHover /
"Volo.Abp.LeptonTheme.Layout.Boxed": "False", / Options: True, False */
"Abp.Mailing.Smtp.Host": "127.0.0.1",
"Abp.Mailing.Smtp.Port": "25",
"Abp.Mailing.Smtp.UserName": "",
"Abp.Mailing.Smtp.Password": "",
"Abp.Mailing.Smtp.Domain": "",
"Abp.Mailing.Smtp.EnableSsl": "false",
"Abp.Mailing.Smtp.UseDefaultCredentials": "true",
"Abp.Mailing.DefaultFromAddress": "noreply@abp.io",
"Abp.Mailing.DefaultFromDisplayName": "ABP application"
},
"AbpLicenseCode
This is appsetting.json
from MigratorDb
{
"ConnectionStrings": {
"Default": "Data Source=XXXX-01;Initial Catalog=TicketsADB;Integrated Security=True"
},
"IdentityServer": {
"Clients": {
"Tickets_Web": {
"ClientId": "Tickets_Web",
"RootUrl": "https://api.server.com:51114"
},
"Tickets_App": {
"ClientId": "Tickets_App",
"RootUrl": "https://front.server.com:51113"
},
"Tickets_Blazor": {
"ClientId": "Tickets_Blazor",
"RootUrl": "https://front.server.com:51113"
},
"Tickets_Swagger": {
"ClientId": "Tickets_Swagger",
"ClientSecret": "1q2w3e*",
"RootUrl": "https://api.server.com:51114"
}
}
},
We publish an empty app generate with ABP Suite. The deployment of the project is on IIS. API show me Swagger page and Angular Front app is runing but after make login i got this console error:
***Access to XMLHttpRequest at 'https://api.server.com:51114/.well-known/openid-configuration' from origin 'https://front.server.com:51113' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource***.
And the error promt is this:
***An error has occurred!
http failure response for https://api.server.com:51114/api/abp/application-configuration: 0 Unknown Error***
Checkig on the API's log file i found following code:
***[ERR] Connection ID "16717361818409893977", Request ID "8000005a-0000-e800-b63f-84710c7967bb": An unhandled exception was thrown by the application.
System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://api.server.com:51114/.well-known/openid-configuration'.
---> System.IO.IOException: IDX20804: Unable to retrieve document from: 'https://front.server.com:51114/.well-known/openid-configuration'.
---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host***
This is code that i have on the API
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddAuthentication()
.AddJwtBearer(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]); ;
options.Audience = "Tickets";
options.BackchannelHttpHandler = new HttpClientHandler()
{
ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};
});
}
***Google the error, someone says it's certificate error so we recreate a new certificate, but same error.***
Hi @christianharo You can bypass that error Clenning Browser cache history, Or Star the app in the browser private mode.