Error Uploading Images I/O Error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 anni tempo fa
Hey

I've been using nop commerce for a few months now with no problems, I have recently upgraded to 2.4 and after about a week of using it the new version, whenever I try to upload images to a product. It will stop uploading and give me a IO error. This is the error in the Log

  Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

  System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item(Int32 index) at System.Web.HttpFileCollectionWrapper.get_Item(Int32 index) at Nop.Admin.Controllers.PictureController.AsyncUpload(String authToken) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) at System.Web.Mvc.Controller.ExecuteCore() at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5() at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0() at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End() at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d() at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I am not sure what to do, any help would greatly be appreciated.
12 anni tempo fa
Not sure if this will help finding a result to an issue, This webpage is running on godaddy in a sub directory. I noticed failed image thumbs appearing in a folder in the / of the webserver called "_hcc_thumbs"  never seen this folder before untill these errors started showing up.
12 anni tempo fa
On further investigation, Image upload works if I go to where I ad a new picture, and i select the image to upload right away. If I load the upload page let it sit open for a minuet, I receive the IO error.

I'm starting to think this is a hosting issue, or something I need to set in my web config? Has any one had similar issues?
12 anni tempo fa
Just some additional Information, This issue appears to of started happening once and a while from upgrading from 2.3 to 2.4, It is just as of a few days ago, every image upload gets this error.  SQL server is 2005
12 anni tempo fa
After trying many things. I finally got it working again! What I had to do is deploy the application in a different sub folder. Every time I would delete and re-deploy in a folder with the same name, I would still receive the error.

After Deleting the application folder, and Deleting the folder settings from IIS. I created a new folder with a different name. Set up that folder for an application in IIS. Downloaded the latest version of nop-commerce, placed my app-data files back in the app-data folder, and the images folder, and theme folder back in. (same as if I was doing an upgrade). Then I uploaded the files to the server, and visited the website located in the new folder. and set the correct folder permissions.  Everything loaded up correctly, and I was able to upload images again!

Hope this helps anyone who is having similar issues.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.