Activities of "dannyb"

Hi,

Can you share detail logs? (include identityServer and HttpApi.Host)

Hi. I tried to share the stack trace error but it hit the character limit.

Received HTTP response headers after 0.8622ms - 400[17:12:24 INF] End processing HTTP request after 0.9518ms - 400[17:12:24 ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name SupplierPortal Health Status.System.InvalidOperationException: Response is null or message can't be deserialized as HealthChecks.UI.Core.UIHealthReport.at System.Net.Http.HttpResponseMessageExtensions.As[TContent](HttpResponseMessage response)at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration)[17:12:24 INF] Notification is sent on same window time.[17:12:24 INF] Saved 1 entities to in-memory store.[17:12:25 INF] Request starting HTTP/1.1 GET http://*removed*/api/account/profile-picture-file/e2f1b844-7318-8d35-032a-3a01109a2b5e?api-version=1.0 - -[17:12:25 INF] Executing endpoint 'Volo.Abp.Account.AccountController.GetProfilePictureFileAsync (Volo.Abp.Account.Pro.Public.HttpApi)'[17:12:25 INF] Route matched with {area = "account", action = "GetProfilePictureFile", controller = "Account", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`*chunk removed*
[17:12:29 INF] Entity Framework Core 6.0.0 initialized 'BackgroundJobsDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.0' with options: QuerySplittingBehavior=SplitQuery[17:12:29 INF] Executed DbCommand (2ms) [Parameters=[@__p_1='?' (DbType = Int32), @__now_0='?' (DbType = DateTime2)], CommandType='Text', CommandTimeout='30']SELECT TOP(@__p_1) [a].[Id], [a].[ConcurrencyStamp], [a].[CreationTime], [a].[ExtraProperties], [a].[IsAbandoned], [a].[JobArgs], [a].[JobName], [a].[LastTryTime], [a].[NextTryTime], [a].[Priority], [a].[TryCount]FROM [AbpBackgroundJobs] AS [a]WHERE ([a].[IsAbandoned] = CAST(0 AS bit)) AND ([a].[NextTryTime] <= @__now_0)ORDER BY [a].[Priority] DESC, [a].[TryCount], [a].[NextTryTime][17:12:33 INF] Request starting HTTP/1.1 GET http://*removed*/api/saas/tenants?GetEditionNames=True&Sorting=&SkipCount=0&MaxResultCount=10&api-version=1.0 - -[17:12:33 INF] Executing endpoint 'Volo.Saas.Host.TenantController.GetListAsync (Volo.Saas.Host.HttpApi)'[17:12:33 INF] Route matched with {area = "saas", controller = "Tenant", action = "GetList", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.Application.Dtos.PagedResultDto`1[Volo.Saas.Host.Dtos.SaasTenantDto]] GetListAsync(Volo.Saas.Host.Dtos.GetTenantsInput) on controller Volo.Saas.Host.TenantController (Volo.Saas.Host.HttpApi).[17:12:34 INF] Entity Framework Core 6.0.0 initialized 'BackgroundJobsDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.0' with options: QuerySplittingBehavior=SplitQuery[17:12:34 INF] Executed DbCommand (2ms) [Parameters=[@__p_1='?' (DbType = Int32), @__now_0='?' (DbType = DateTime2)], CommandType='Text', CommandTimeout='30']SELECT TOP(@__p_1) [a].[Id], [a].[ConcurrencyStamp], [a].[CreationTime], [a].[ExtraProperties], [a].[IsAbandoned], [a].[JobArgs], [a].[JobName], [a].[LastTryTime], [a].[NextTryTime], [a].[Priority], [a].[TryCount]FROM [AbpBackgroundJobs] AS [a]WHERE ([a].[IsAbandoned] = CAST(0 AS bit)) AND ([a].[NextTryTime] <= @__now_0)ORDER BY [a].[Priority] DESC, [a].[TryCount], [a].[NextTryTime][17:12:34 INF] Executing action method Volo.Saas.Host.TenantController.GetListAsync (Volo.Saas.Host.HttpApi) - Validation state: Valid[17:12:34 INF] Authorization failed. These requirements were not met:PermissionRequirement: Saas.Tenants[17:12:34 WRN] ---------- RemoteServiceErrorInfo ----------{"code": "Volo.Authorization:010001","message": "Authorization failed! Given policy has not granted.","details": null,"data": {},"validationErrors": null}
[17:12:34 WRN] Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown.Volo.Abp.Authorization.AbpAuthorizationException: Exception of type 'Volo.Abp.Authorization.AbpAuthorizationException' was thrown.at Microsoft.AspNetCore.Authorization.AbpAuthorizationServiceExtensions.CheckAsync(IAuthorizationService authorizationService, AuthorizationPolicy policy)at Volo.Abp.Authorization.MethodInvocationAuthorizationService.CheckAsync(MethodInvocationAuthorizationContext context)at Volo.Abp.Authorization.AuthorizationInterceptor.AuthorizeAsync(IAbpMethodInvocation invocation)at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)at lambda_method2907(Closure , Object )at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()--- End of stack trace from previous location ---at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)[17:12:34 WRN] Code:Volo.Authorization:010001[17:12:34 INF] Entity Framework Core 6.0.0 initialized 'HealthChecksDb' using provider 'Microsoft.EntityFrameworkCore.InMemory:6.0.0' with options: StoreName=HealthChecksUI[17:12:34 INF] Start processing HTTP request GET http://127.0.0.1:9652/health-status[17:12:34 INF] Sending HTTP request GET http://127.0.0.1:9652/health-status[17:12:34 INF] Request starting HTTP/1.1 GET http://127.0.0.1:9652/health-status - -[17:12:34 ERR] 'MS-ASPNETCORE-TOKEN' does not match the expected pairing token 'ab2e7d95-50d9-4eae-aa4d-041c5c258fd5', request rejected.[17:12:34 INF] Request finished HTTP/1.1 GET http://127.0.0.1:9652/health-status - - - 400 0 - 0.1190ms[17:12:34 INF] Received HTTP response headers after 0.7606ms - 400[17:12:34 INF] End processing HTTP request after 0.8428ms - 400[17:12:34 ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name SupplierPortal Health Status.System.InvalidOperationException: Response is null or message can't be deserialized as HealthChecks.UI.Core.UIHealthReport.at System.Net.Http.HttpResponseMessageExtensions.As[TContent](HttpResponseMessage response)at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReport(HealthCheckConfiguration configuration)[17:12:34 INF] Notification is sent on same window time.[17:12:34 INF] Saved 1 entities to in-memory store.[17:12:34 INF] AuthenticationScheme: Bearer was challenged.[17:12:34 INF] Executed action Volo.Saas.Host.TenantController.GetListAsync (Volo.Saas.Host.HttpApi) in 579.9252ms[17:12:34 INF] Executed endpoint 'Volo.Saas.Host.TenantController.GetListAsync (Volo.Saas.Host.HttpApi)'[17:12:34 INF] Entity Framework Core 6.0.0 initialized 'AbpAuditLoggingDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.0' with options: QuerySplittingBehavior=SplitQuery[17:12:35 INF] Executed DbCommand (2ms) [Parameters=[@p0='?' (DbType = Guid), @p1='?' (Size = 96), @p2='?' (Size = 512), @p3='?' (Size = 64), @p4='?' (Size = 64), @p5='?' (Size = 128), @p6='?' (Size = 256), @p7='?' (Size = 40), @p8='?' (Size = 64), @p9='?' (Size = -1), @p10='?' (DbType = Int32), @p11='?' (DbType = DateTime2), @p12='?' (Size = 4000), @p13='?' (Size = 16), @p14='?' (DbType = Int32), @p15='?' (DbType = Guid), @p16='?' (DbType = Guid), @p17='?' (DbType = Guid), @p18='?' (Size = 4000), @p19='?' (Size = 256), @p20='?' (DbType = Guid), @p21='?' (Size = 256)], CommandType='Text', CommandTimeout='30']SET NOCOUNT ON;INSERT INTO [AbpAuditLogs] ([Id], [ApplicationName], [BrowserInfo], [ClientId], [ClientIpAddress], [ClientName], [Comments], [ConcurrencyStamp], [CorrelationId], [Exceptions], [ExecutionDuration], [ExecutionTime], [ExtraProperties], [HttpMethod], [HttpStatusCode], [ImpersonatorTenantId], [ImpersonatorUserId], [TenantId], [TenantName], [Url], [UserId], [UserName])VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21);[17:12:35 INF] Executed DbCommand (1ms) [Parameters=[@p0='?' (DbType = Guid), @p1='?' (DbType = Guid), @p2='?' (DbType = Int32), @p3='?' (DbType = DateTime2), @p4='?' (Size = 4000), @p5='?' (Size = 128), @p6='?' (Size = 2000), @p7='?' (Size = 256), @p8='?' (DbType = Guid)], CommandType='Text', CommandTimeout='30']SET NOCOUNT ON;INSERT INTO [AbpAuditLogActions] ([Id], [AuditLogId], [ExecutionDuration], [ExecutionTime], [ExtraProperties], [MethodName], [Parameters], [ServiceName], [TenantId])VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8);[17:12:35 INF] Executed DbCommand (1ms) [Parameters=[@p0='?' (DbType = Guid), @p1='?' (DbType = Guid), @p2='?' (DbType = Int32), @p3='?' (DbType = DateTime2), @p4='?' (Size = 4000), @p5='?' (Size = 128), @p6='?' (Size = 2000), @p7='?' (Size = 256), @p8='?' (DbType = Guid)], CommandType='Text', CommandTimeout='30']SET NOCOUNT ON;INSERT INTO [AbpAuditLogActions] ([Id], [AuditLogId], [ExecutionDuration], [ExecutionTime], [ExtraProperties], [MethodName], [Parameters], [ServiceName], [TenantId])VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8);[17:12:35 INF] Request finished HTTP/1.1 GET http://*removed*/api/saas/tenants?GetEditionNames=True&Sorting=&SkipCount=0&MaxResultCount=10&api-version=1.0 - - - 401 0 - 1293.8539ms

[17:12:39 INF] Entity Framework Core 6.0.0 initialized 'BackgroundJobsDbContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.0' with options: QuerySplittingBehavior=SplitQuery
[17:12:39 INF] Executed DbCommand (2ms) [Parameters=[@__p_1='?' (DbType = Int32), @__now_0='?' (DbType = DateTime2)], CommandType='Text', CommandTimeout='30']SELECT TOP(@__p_1) [a].[Id], [a].[ConcurrencyStamp], [a].[CreationTime], [a].[ExtraProperties], [a].[IsAbandoned], [a].[JobArgs], [a].[JobName], [a].[LastTryTime], [a].[NextTryTime], [a].[Priority], [a].[TryCount]FROM [AbpBackgroundJobs] AS [a]WHERE ([a].[IsAbandoned] = CAST(0 AS bit)) AND ([a].[NextTryTime] <= @__now_0)ORDER BY [a].[Priority] DESC, [a].[TryCount], [a].[NextTryTime][17:12:39 INF] Request starting HTTP/1.1 GET http://*removed*/api/saas/editions?SkipCount=0&MaxResultCount=1000&api-version=1.0 - -[17:12:39 INF] Authorization failed. These requirements were not met:PermissionRequirement: Saas.Editions[17:12:39 INF] AuthenticationScheme: Bearer was challenged.[17:12:39 INF] Request finished HTTP/1.1 GET http://*removed*/api/saas/editions?SkipCount=0&MaxResultCount=1000&api-version=1.0 - - - 401 0 - 4.7868ms

Hi,

As I understand it, our first problem has been solved. 👇👇

I am attempting to publish the application onto Azure. But sadly the services are not starting. Attached is the stdout.

Because the error in the first log record does not appear in the log anymore.

Coming to our current problem, I don't think it's related to ABP. There is no information about ABP in the last log you sent.

In this case, unfortunately I can't be of any further help 😔

I would say partially solved

When publishing to Azure, is there anything specific that needs to happen/be set?

The first issue was related to the virtual file path and it being a Development build - running it as Release causes the app to not even start.

I feel something is wrong with the publish settings or app service?

I appreciate your time and help on this.

Is the log of the published application you run locally empty? If it is not empty, could you share the relevant log?

Aye, it is empty. This is the log stream from Azure when attempting to run the app service.

Connecting... 2021-10-12T20:54:45 Welcome, you are now connected to log-streaming service. The default timeout is 2 hours. Change the timeout with the App Setting SCM_LOGSTREAM_TIMEOUT (in seconds). 2021-10-12T20:54:51 PID[5372] Information Unpacking resources... 2021-10-12T20:54:51 PID[5372] Information 10-12 20:54:51 Information: Executing Application Insights Profiler agent version 2.6.2010.2703 with arguments: 2021-10-12T20:54:51 PID[5372] Information 10-12 20:54:51 Information: Minimum version enabled on machine: 1.0.0 2021-10-12T20:54:51 PID[5372] Information 10-12 20:54:51 Information: Applying logging level: Information 2021-10-12T20:54:51 PID[5372] Information 10-12 20:54:51 Information: Instrumentation key: **removed** 2021-10-12T20:54:51 PID[5372] Information 10-12 20:54:51 Information: Application Insights Profiler endpoint: https://agent.azureserviceprofiler.net 2021-10-12T20:54:51 PID[5372] Information 10-12 20:54:51 Information: Application Insights endpoint: https://dc.services.visualstudio.com 2021-10-12T20:54:51 PID[5372] Information 10-12 20:54:51 Information: Runtime Environment: Antares 2021-10-12T20:54:51 PID[5372] Information 10-12 20:54:51 Information: Support files: C:\local\Temp\jobs\continuous\ApplicationInsightsProfiler3\ntngl1ww.tjk\spsupport 2021-10-12T20:54:51 PID[5372] Information 10-12 20:54:51 Information: Providing usage data (to opt out set the AppSettings ApplicationInsightsProvideUsageTelemetryData with the value "false"): True 2021-10-12T20:54:51 PID[5372] Information 10-12 20:54:51 Information: Engine mode: Sampling 2021-10-12T20:54:52 PID[5372] Information 10-12 20:54:52 Information: Application Insights AppId: **removed** 2021-10-12T20:54:52 PID[5372] Information 10-12 20:54:52 Information: Press 'Ctrl+C' to exit Application Insights Profiler. 2021-10-12T20:54:52 PID[5372] Information 10-12 20:54:52 Information: Set up shutdown handler. 2021-10-12T20:54:52 PID[5372] Information 10-12 20:54:52 Information: Shutdown handler set to watch C:\local\Temp\JobsShutdown\continuous\ApplicationInsightsProfiler3\ox0av3hd.jci. 2021-10-12T20:54:52 PID[5372] Information 10-12 20:54:52 Information: Starting main process 2021-10-12T20:54:53 PID[5372] Information 10-12 20:54:53 Critical: Settings have been set from Engine 2021-10-12T20:54:53 PID[5372] Information 10-12 20:54:53 Critical: Settings contract has been updated 2021-10-12T20:54:53 PID[5372] Information 10-12 20:54:53 Critical: Enabled has been set to True 2021-10-12T20:56:45 No new trace in the past 1 min(s). 2021-10-12T20:57:45 No new trace in the past 2 min(s).

This is possible, if you delete the code in the picture in my previous answer from the MyProjectName.IdentityServer(and other projects) project, you can publish and run it with the Development environment variable.

But, I cannot recommend publishing the application in the Development environment because; In general,it is desirable that the Development and Production environment be as similar as possible. However, there are a few fundamental differences. For example, while the UseDeveloperExceptionPage middleware is requested to work only with the Development environment variable, the UseErrorPage middleware is requested to run in the Production environment. Considering such situations, even if what you want is not recommended, it does not mean that you cannot do it.

Thank you. I have been unable to run a release (Production) build of the application. Even on my local machine I am unable to run the Release build through dotnet Togarrach.Core.IdentityServer.dll

The stdout on Azure is also blank.

Hi,

You are probably not running the application in the Production environment.

Please make sure ASPNETCORE_ENVIRONMENT is Production!

The offending piece of code is the following code inside MyProjectNameIdentityServerModule under MyProjectName.IdentityServer project. This piece of code is set to run only in Developmentenvironment.

If you want, you can delete this piece of code and publish it again (on Azure or local machine) to make sure this is the problem. I think you will not get error this time.

If you don't get an error, you can fix the problem permanently by setting ASPNETCORE_ENVIRONMENT to Production where you run the application.

For more information you can check here.

Hey berkansasmaz, thank you for the quick reply!
It is a dev build running on Azure - ASPNETCORE_ENVIRONMENT is Development (as intended).

Will test your solution later this evening and close if resolved.

I appear to still be having issues.

Is it not possible to run a Development build on Azure as an App Service?

Hi,

You are probably not running the application in the Production environment.

Please make sure ASPNETCORE_ENVIRONMENT is Production!

The offending piece of code is the following code inside MyProjectNameIdentityServerModule under MyProjectName.IdentityServer project. This piece of code is set to run only in Developmentenvironment.

If you want, you can delete this piece of code and publish it again (on Azure or local machine) to make sure this is the problem. I think you will not get error this time.

If you don't get an error, you can fix the problem permanently by setting ASPNETCORE_ENVIRONMENT to Production where you run the application.

For more information you can check here.

Hey berkansasmaz, thank you for the quick reply! It is a dev build running on Azure - ASPNETCORE_ENVIRONMENT is Development (as intended).

Will test your solution later this evening and close if resolved.

Showing 11 to 16 of 16 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11