Try our conversational search powered by Generative AI!

Images aren't loaded

Vote:
 

Hi!


I've got a problem with displaying product images on the website. This error is thrown, as I can see in my log file.

 

System.IO.IOException: The process cannot access the file '......\BlobStorage\Public\8efd72d8380e48c793cba63918101f78\Tasse-et-sous-tasse-SONTU-var_productoverviewimage.jpg' because it is being used by another process.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)

   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)

   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)

   at System.IO.File.Open(String path, FileMode mode, FileAccess access)

   at Mediachase.BusinessFoundation.Blob.PublicDiskStorageProvider.ReadStream(BlobInfo blobInfo)

   at EPiServer.Business.Commerce.VirtualPathProviders.AssetVirtualFile.Open()

   at EPiServer.Web.StaticFileHandler.SendVirtualFile(VirtualFile virtualFile, HttpContext context)

   at EPiServer.Web.StaticFileHandler.ProcessVirtualFileEx(VirtualFileEx virtualFileEx, HttpContext context)

   at EPiServer.Web.StaticFileHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state)

   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

Does someone knows how I can fix this problem?


Thanks.

#72480
Jun 18, 2013 15:27
Vote:
 

Anyone?

#72573
Jun 21, 2013 8:31
Vote:
 

looks like your are saving/updating and reading at the same time. Not familiar with commerce but you can get the same behaviour when downloading images and saving them to disk when you try to view them at a page at the same time. For instance if you are using a image resize funtionality when downloding images from external source. 

Have a look in your code if you do something specific with images if not send an email to the episerver support.

#72584
Jun 22, 2013 12:18
Vote:
 

Hi good suggestions Eric. I'm using EPiImageResizer to resize the image, but strange thing is that EPiImageResizer cache the resized image on the server. After the image is cached I still get the above error.

<EPiImage:EPiImageResizer
                                            ID="ImageRightImage"
                                            Transformation="ScaleToFit"
                                            Width="148"
                                            Height="120"
                                            ImageURL='<%# Eval("") %>'
                                            runat="server"
                                            Alt="" />

#72592
Jun 24, 2013 8:33
Vote:
 

ok I had some trouble with epiimage as well so i descided to go with this one, it is very common to use at the moment in all kinds of .net projects: http://imageresizing.net/ you can read more about it here as well: http://www.hanselman.com/blog/NuGetPackageOfWeek11ImageResizerEnablesCleanClearImageResizingInASPNET.aspx

It is very easy to install as well just install with nuget: three packages, the dll:s the web.config and the diskcache plugin.

Once you have installed it you can easly use it with just adding a querystring after your img src. An httpmodule will intercept the call and resize the image for you.

If the images is working without the image resize it is probably some issue with that module/code.

#72596
Jun 24, 2013 9:17
Vote:
 

Thanks for your suggestion that solved my problem.

#73457
Jul 23, 2013 7:17
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.