Here is a minimal project that demonstrates the error. It works fine on my dev machine, but fails in production. Also, here is a link to this project in production.
Hi Chris,
Thank you for the project. I see the issue. This exception is raised in the PhotoUtils.SaveToJpeg(Bitmap bitmap, string filePath, long qualityPercent) server-side method (in your code). You can debug it further if you run this project in the VisualStudio debugger.
In the next version, we will handle server-side exceptions, and display them in the error row.
Thanks,
Michael.
Hi Micheal,
Actually, PhotoUtils.cs is your code (DevExpress) that is part of the FileUpload demo. This was working fine until I upgraded to v8.3.2.0, and as I mentioned, it does not fail on my dev machine, only in production where I cannot use the VS debugger. So, I'm at a loss here.
Since you see the problem, can you point it out? Or better yet, tell me how you determined PhotoUtils was the issue. You must have a different way of debugging this issue since you see it, but my dev machine does not. Thoughts??
Hi Chris,
You're right. This code is copied from our demo. And it is correct. We have found that the exception is raised because the code tries to write to a protected file. The Images/ThumbnailImage.jpg file in your project is deployed as read-only. Simply remove it from the project.
Thanks,
Michael.
Hi Michael,
Thanks for the reply, but your statement is not correct. The Images/ThumbnailImage.jpg has read-write (-rwxrwx---) permissions. Also, I deleted the jpg file and tried the upload again, but I still get the same error. I checked the folder permissions, and they look ok too (drwxrwx---).
I'm not sure why you thought the image was read-only, but that is not the mail issue.
I see there is a v8.3.3.0 to fix this, but I'm wondering if it really will fix it. Should I request this version now or wait for your thoughts on this update.
Cheers,
Chris
Hi Chris,
I have also tested the project you provided on another machine (WinXP SP3, VS2005 SP1, DXperience v8.3.2, IE7). It doesn't show any error to me. Please install the WinXP SP3 and the latest updates, and let us know if this helps. Anyway, I believe this problem is related to your server, or how you are deploying this project.
Thanks,
Michael.
Hi Micheal,
Sorry to be dense, but now I'm confused. Do you see the problem or not? It appears we are seeing the same behavior. i.e. Working on a local dev machine, but not working on my live site. Does v8.3.3 really solve the problem?
Your last post says to do updates, etc, but that will only affect my dev machine which is working fine. It is the production server (shared hosting) that has the issue, and I have no control over any service packs on that machine.
I'll download v8.3.3 and try it out, but I'm doubtful it will resolve the problem. I'll let you know as soon as I get the new version and get it into production.
Hi Chris,
I have reproduced this issue on a machine with Windows Vista OS. Yet, I can't reproduce it on another one with Windows XP OS. We have investigated that the exception is thrown when the Bitmap.Save method tries to rewrite a protected file (Images/ThumbnailImage.jpg). This problem isn't related to our components. We have managed to resolve this issue on our Vista machine by setting appropriate access rights for this file and directory. I believe, there's a similar problem with your server.
The fix we offer for this issue is related to providing a proper error message for the inner exception. It could help when determining problems with uploading. But, it will not resolve your particular issue (see above). So, you hardly need to install an intermediate build.
Thanks,
Michael.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.
Facebook
Twitter
Google+