Here you go:
URL: (POST) /api/services/app/Notification/SetNotificationAsRead
Hostname: WN0LDWK0002LC
Status Code: 500
Type: System.ComponentModel.Win32Exception
Message: The wait operation timed out.
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
---> 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 Task<DbDataReader> Microsoft.Data.SqlClient.SqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)+(Task<SqlDataReader> result) => { }
at void System.Threading.Tasks.ContinuationResultTaskFromResultTask<TAntecedentResult, TResult>.InnerInvoke()
at async Task<RelationalDataReader> Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) x 2
at async Task Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
ClientConnectionId:b2d68fed-75a2-4bbf-bd45-59f0926d7ecc
Error Number:-2,State:0,Class:11
ClientConnectionId before routing:0de1682f-2deb-4900-b43c-041492f0523b
Routing Destination:b42514b928c6.HS1.tr2061.canadacentral1-a.worker.database.windows.net,11011
--- End of inner exception stack trace ---
at async Task Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
at async Task Microsoft.EntityFrameworkCore.SqlServer.Update.Internal.SqlServerModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
at async Task<int> Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable<ModificationCommandBatch> commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) x 3
at async Task<int> Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList<IUpdateEntry> entriesToSave, CancellationToken cancellationToken) x 2
at async Task<TResult> Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync<TState, TResult>(TState state, Func<DbContext, TState, CancellationToken, Task<TResult>> operation, Func<DbContext, TState, CancellationToken, Task<ExecutionResult<TResult>>> verifySucceeded, CancellationToken cancellationToken)
at async Task<int> Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(bool acceptAllChangesOnSuccess, CancellationToken cancellationToken) x 2
at async Task<int> Abp.EntityFrameworkCore.AbpDbContext.SaveChangesAsync(CancellationToken cancellationToken)
at async Task<int> Abp.Zero.EntityFrameworkCore.AbpZeroCommonDbContext<TRole, TUser, TSelf>.SaveChangesAsync(CancellationToken cancellationToken)
at async Task Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.SaveChangesAsync()
at async Task Abp.Notifications.NotificationStore.UpdateUserNotificationStateAsync(int? tenantId, Guid userNotificationId, UserNotificationState state)+(?) => { }
at async Task Abp.Domain.Uow.UnitOfWorkManagerExtensions.WithUnitOfWorkAsync(IUnitOfWorkManager manager, Func<Task> action, UnitOfWorkOptions options)
at async Task Abp.Notifications.NotificationStore.UpdateUserNotificationStateAsync(int? tenantId, Guid userNotificationId, UserNotificationState state)
at async Task<SetNotificationAsReadOutput> PatientManagement.Notifications.NotificationAppService.SetNotificationAsRead(EntityDto<Guid> input) in C:/Users/vtoll/source/repos/PatientManagement/src/PatientManagement.Application/Notifications/NotificationAppService.cs:line 378
at object lambda_method22956(Closure, object)
at async ValueTask<IActionResult> Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor+AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, object controller, object[] arguments)
at async Task Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()+Logged(?)
at async Task Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()+Awaited(?)
at void Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Task Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
at async Task Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()+Awaited(?)
at async Task Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextExceptionFilterAsync()+Awaited(?)
Also, on our Azure instance - it's created a new index.
The thing is, while we have been using notifications - it's not the kind of notification that a user would want to see in the notifications area, it's more just temporary based on retrieving from a slow API that they are doing that is taking a very long time. There's no need to show it in the "inbox" as it doesn't matter once it's completed.
If you look here, you're translating a server "event" into a client-side using an IIFE- but obviously, that won't work in the context of a background job:
script.AppendLine("(function(){");
script.AppendLine(" abp.event.trigger('abp.dynamicScriptsInitialized');");
script.Append("})();");
We have been trying to use notifications but we're getting SQL timeouts because I gather we're abusing notifications so we'd like to use EventBus but it doesn't look like events triggered on the server can be observed client side, is that correct?
We essentially have a background job that is gathering information from a very slow API and we'd like to continue to notify the user when actions are still occurring, but not using IAppNotifier (as it causes the DB timeout issues).
We are thinking about using a SignalR hub that can handle IAsyncEventHandler<SuperCoolEvents>
and then send a message to the user by user id which then does the abp.event.trigger
with the same data.
If it does work, it'd be nice to see this in the system generally - though it sounds like this would only work if SignalR is enabled, not sure how you'd do it otherwise.
After the v12 update, we're getting the following error trying to build the mobile solution:
The type or namespace name 'ApplicationPartAttributeAttribute' does not exist in the namespace 'Microsoft.AspNetCore.Mvc.ApplicationParts' (are you missing an assembly reference?) PatientManagement.Mobile.MAUI (net7.0-android)
\src\PatientManagement.Mobile.MAUI\obj\Debug\net7.0-ios\iossimulator-x64\PatientManagement.Mobile.MAUI.MvcApplicationPartsAssemblyInfo.cs
So, page.js is bundled but from what? I'm not sure I have anything but the pre-bundled file here.
We're in the very end of a process that has required us to get a Privacy Impact Assessment, Threat Risk Assessment, Penetration Test and Vulnerability Scans and there are some items that we can't resolve because they are internal to this project.
1. Page.js contains an insecure version of jquery:
"/saas/js/page.min.js contains jquery 3.4.1 which has known vulnerabilities."
The main site uses 3.6.0 (latest), can page.js use that already correct version?
2. User session timeout does not work propertly:
"The application does not terminate users’ sessions after session timeout; users’ sessions can be resumed without login to the (oauth provider) again."
This might just be configuration, but we're not certain where.
(Using product version 10.5.0 .NET Core MVC)
Getting an error on login following a specific sequence:
Instead of successfully logging in, a 400 bad request response is sent back. Upon closer inspection, an ASP.NET Core antiforgery token is lingering in the cookies and fails the automatic validation applied to the Login controller method.
Adding an IgnoreAntiforgeryToken attribute to the login method is the most obvious solution. Does this interfere with ABP's automatic CSRF validation or will the login form still be protected? Might something else be missing that would prevent this problem altogether?
We've been experiencing some growing pains here and on watching a really informative webinar yesterday (https://blog.jetbrains.com/dotnet/2021/10/08/profiling-and-fixing-common-performance-bottlenecks-webinar-recording) we've tried to start working on some of those anti-patterns we were using (like awaits inside loops).
Now that we've started, however, we're getting the error:
A second operation was started on this context before a previous operation completed. This is usually caused by different threads concurrently using the same instance of DbContext
Here's one such example, the original code:
What are we missing here? We can wrap things in semaphoneslim to correct this (since lock can't have async code inside) but that doesn't "smell" right at all ..
Didn't touch anything, straight from the download. I suspect that the mac I'm using is unhappy, I'm just reformatting it to see if that changes anything.
If we generate a new demo project today with these settings:
And attempt to run the Xamarin project in the simulator, following the dev guide, it fails with:
Error processing the method 'System.Void Abp.Auditing.AuditingInterceptor/<InternalInterceptAsynchronous>d__6`1::MoveNext()' in the assembly 'Abp.dll': Value cannot be null.
Looks like it's something related to the linker going wrong.