Slow response, and timeouts in the backoffice (only localhost)
m

Marco

9 months ago
Since I got a new laptop, the backoffice in Umbraco on localhost has really bad performance. The website on the frontend is super fast, however if there are images that are fetched from an api (for example a custom controller to get the right crop), those are also loaded slow, like the backoffice. My guess is that there is something wrong with my SQL Server (developer edition) setup or similar configuration on my laptop. The weird thing is that the exact same setup worked perfectly fine on my old laptop. Both laptops got Windows 11, and the same version of software installed to make localhost work. My localhost project is using Umbraco 10.8.8, and is a clone of a Cloud project. When I access the backoffice, most of the times I need to wait for about 30 seconds to show to content tree. I checked the network tab, and saw that the "/umbraco/backoffice/umbracotrees/applicationtree/GetApplicationTrees?application=content&tree=&use=main" call is stuck waiting for server response for more than 25 seconds. However this is completely random. Sometimes the backoffice just needs 3 seconds to load. This randomness got me to think there is some kind of scheduled task working in the background that slows the performance or locks the database, but I disabled all of the (custom) scheduled tasks of the project, so this can't be it. If it was only the content tree in the backoffice that loads for 30 seconds, I could live with it, but there is more. Often when I access the media or settings tab in the backoffice, it keeps loading and eventually giving me timeouts. I tried to delete the TEMP folder, and rebuilding the indexers. Most of the times when rebuilding the indexers it gives me a timeout, and it didn't complete. What I also tried was firing up a complete different project in Visual Studio, and experimenting if the backoffice is also slow in other projects, but it seemed to be loading fast. So on the one hand there could be something wrong with my project, or my configuration https://cdn.discordapp.com/attachments/1344605280281038849/1344605280540819486/Timeout-populating-indexers.png?ex=67c184c0&is=67c03340&hm=f25a04a3a145bc9819ef42a46e26d77d99b22fcc802fdfb46744dc2a954d7b1a&
Umbraco Commerce Concurrency exception
m

Mike Masey

over 1 year ago
Heyo, I'm currently experiencing an unexpected error with my local Umbraco Commerce instance. It was all working as expected then suddenly started throwing this error on a successful transaction. The order completes correctly, but it doesn't take me to the confirmation page. I'm using both the Stripe and Checkout packages, although the checkout is a copy of the source, rather than the nuget due to needing some additional functionality. The error appears to be coming from Umbraco Commerce itself, but i'm not sure why. I did accidently restart the site midway through a transaction so I wonder if somethings gone funky in the db? This is all is get form the error message
System.Data.DBConcurrencyException: A Concurrency update occurred in table 'umbracoCommerceOrder' for primary key value(s) = 'a28b060c-6bed-4ab9-a433-019002723487' and version = '11'
   at Umbraco.Commerce.Infrastructure.Resiliency.PollyExecutionStrategyBase.ExecuteAsync[TResult](Func`2 operation, Func`2 verifySucceeded, CancellationToken cancellationToken)
   at Umbraco.Commerce.Core.UmbracoCommerceUnitOfWorkProvider.ExecuteAsync[T](IUnitOfWorkOptions options, Func`3 action, CancellationToken cancellationToken)
   at Umbraco.Commerce.Cms.Web.Controllers.UmbracoCommercePaymentController.CallbackWithRetry(IPaymentProvider paymentProvider, PaymentProviderContext ctx, Int32 retryCount, Int32 maxRetries)
Any assistance would be greatly appreciated. This is on Umbraco 13.3.2 and Umbraco Commerce 13.1.4.
Scanning File Uploads in Umbraco Forms (Azure Blob Configuration)
p

Piotr KrĂłl

9 months ago
Hi everyone, I'm currently working with Umbraco 10.8.6 and Umbraco Forms 10.5.4, with my media stored on Azure Blob Storage. I have a contact form that includes a File Upload field where users can attach a file. My goal is to scan the file's contents using my existing method, ScanFile()—which takes a Stream representing the file content—before the file is saved in the system to ensure it doesn’t contain any malicious software. I've tried a few approaches so far: 1. I attempted to add a custom workflow to validate the file. However, it seems that by the time the workflow runs, the file is already saved in a temporary folder on Azure Blob. 2. I also tried using the MediaSavingNotification, but it appears that Umbraco Forms bypasses this notification when a file is uploaded via the form. 3. Additionally, I experimented with something like a FormValidateNotification. In that case, I had access to all the values from the submitted form. However, the file upload field's value appears as a 260-character string that doesn’t contain the file's content; it ends with the attached file's name. I'm not sure what this string represents, and I couldn’t find any documentation about it. Another idea I had was to add middleware to intercept the HTTP request after the form is submitted. However, that approach feels clunky, and I'm convinced there must be a better way. Has anyone faced a similar issue or have suggestions on the best approach to scan the file before it is saved? Perhaps there are even better methods that I haven’t considered. Thanks in advance for your help!