Nop-Templates.com wrote:
Hi, Boyko. I was able to reproduce the problem you described and will try to understand its causes, here is a ticket to track the status.
Thank you, Sergei!
Thanks,
Boyko
Thank you, Sergei!
Thanks,
Boyko
migrationInfo.Description.StartsWith(string.Format(NopMigrationDefaults.UpdateMigrationDescriptionPrefix, NopVersion.FULL_VERSION
An unhandled exception occurred while processing the request.
IOException: The process cannot access the file 'C:\Users\ciuss\source\repos\nopCommerce_4.60.2_Source\Presentation\Nop.Web\wwwroot\images\0000020_0.jpeg' because it is being used by another process.
Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(string fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
Stack Query Cookies Headers Routing
IOException: The process cannot access the file 'C:\Users\ciuss\source\repos\nopCommerce_4.60.2_Source\Presentation\Nop.Web\wwwroot\images\0000020_0.jpeg' because it is being used by another process.
Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(string fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
Microsoft.Win32.SafeHandles.SafeFileHandle.Open(string fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, long preallocationSize, Nullable<UnixFileMode> unixCreateMode)
System.IO.File.<WriteAllBytesAsync>g__Core|92_0(string path, byte[] bytes, CancellationToken cancellationToken)
Nop.Core.Infrastructure.NopFileProvider.WriteAllBytesAsync(string filePath, byte[] bytes) in NopFileProvider.cs
+
await File.WriteAllBytesAsync(filePath, bytes);
Nop.Services.Media.PictureService.SavePictureInFileAsync(int pictureId, byte[] pictureBinary, string mimeType) in PictureService.cs
+
await _fileProvider.WriteAllBytesAsync(await GetPictureLocalPathAsync(fileName), pictureBinary);
Nop.Services.Media.PictureService.UpdatePictureAsync(int pictureId, byte[] pictureBinary, string mimeType, string seoFilename, string altAttribute, string titleAttribute, bool isNew, bool validateBinary) in PictureService.cs
+
await SavePictureInFileAsync(picture.Id, pictureBinary, mimeType);
Nop.Services.Media.PictureService.GetPictureUrlAsync(Picture picture, int targetSize, bool showDefaultPicture, string storeLocation, PictureType defaultPictureType) in PictureService.cs
+
picture = await UpdatePictureAsync(picture.Id,
Nop.Web.Factories.ProductModelFactory+<>c__DisplayClass45_0+<<PrepareProductOverviewPicturesModelAsync>g__preparePictureModelAsync|2>d.MoveNext() in ProductModelFactory.cs
+
var picResultTasks = await Task.WhenAll(_pictureService.GetPictureUrlAsync(picture, pictureSize), _pictureService.GetPictureUrlAsync(picture));
Nop.Web.Factories.ProductModelFactory+<>c__DisplayClass45_0+<<PrepareProductOverviewPicturesModelAsync>b__3>d.MoveNext() in ProductModelFactory.cs
+
.SelectAwait(async picture => await preparePictureModelAsync(picture))
System.Threading.Tasks.ValueTask<TResult>.get_Result()
System.Linq.AsyncEnumerable+SelectEnumerableAsyncIteratorWithTask<TSource, TResult>.MoveNextCore() in Select.cs
System.Linq.AsyncIteratorBase<TSource>.MoveNextAsync() in AsyncIterator.cs
System.Linq.AsyncIteratorBase<TSource>.MoveNextAsync() in AsyncIterator.cs
System.Linq.AsyncEnumerable.<ToListAsync>g__Core|424_0<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken) in ToList.cs
System.Linq.AsyncEnumerable.<ToListAsync>g__Core|424_0<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken) in ToList.cs
System.Threading.Tasks.ValueTask<TResult>.get_Result()
Nop.Web.Factories.ProductModelFactory+<>c__DisplayClass45_0+<<PrepareProductOverviewPicturesModelAsync>b__1>d.MoveNext() in ProductModelFactory.cs
+
var pictureModels = await pictures
Nop.Core.Caching.MemoryCacheManager.GetAsync<T>(CacheKey key, Func<Task<T>> acquire) in MemoryCacheManager.cs
+
result = await acquire();
Nop.Web.Factories.ProductModelFactory.PrepareProductOverviewPicturesModelAsync(Product product, Nullable<int> productThumbPictureSize) in ProductModelFactory.cs
+
var cachedPictures = await _staticCacheManager.GetAsync(cacheKey, async () =>
Nop.Web.Factories.ProductModelFactory.PrepareProductOverviewModelsAsync(IEnumerable<Product> products, bool preparePriceModel, bool preparePictureModel, Nullable<int> productThumbPictureSize, bool prepareSpecificationAttributes, bool forceRedirectionAfterAddingToCart) in ProductModelFactory.cs
+
model.PictureModels = await PrepareProductOverviewPicturesModelAsync(product, productThumbPictureSize);
Nop.Web.Components.HomepageProductsViewComponent.InvokeAsync(Nullable<int> productThumbPictureSize) in HomepageProductsViewComponent.cs
+
var model = (await _productModelFactory.PrepareProductOverviewModelsAsync(products, true, true, productThumbPictureSize)).ToList();
Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsyncCore(ObjectMethodExecutor executor, object component, ViewComponentContext context)
Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsync(ViewComponentContext context)
Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsync(ViewComponentContext context)
Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeCoreAsync(ViewComponentDescriptor descriptor, object arguments)
AspNetCore.Views_Home_Index.ExecuteAsync() in Index.cshtml
+
@await Component.InvokeAsync(typeof(HomepageProductsViewComponent))