Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 17, 2013 11:07 AM by imtiaz.extreme
Jan 13, 2013 01:59 PM|LINK
This might not be the correct forum to post this in for which I apologise in advance. I urgently need some assistance with resizing and uploading images (JPG files) to my web server (Windows Web Server 2008 R2 with IIS 7).
I have a routine whereby users can select any number of images (JPG files) using an Obout File Upload control and then upload the selected images to the web server. Prior to uploading the images are resized according to specification and subsequently stored
in the appropriate folder on the server.
This process works perfectly in the development environment: the images are resized according to specification and saved in the correct folders. However, in the production environment the images are not saved, despite it appearing that the resizing processes
are completed without error (no error messages are displayed) the images are not saved in the correct folders.
The above leads me to believe that the problem resides on Windows Web Server and, or, IIS 7. I have triple-checked user permissions and can confirm that the relevant user account does have reading and writing permissions to the particular parent and child
folders. In support consider that another process in the app has to affect that for each new record 2 new child folders (1 folder wherein images are stored and another folder wherein PDF files are stored) are created in 2 separate parent folders. The permissions
on both parent folders are exactly the same. The process to create the new folders works perfectly in the production environment so too the process to upload PDF files.
The code being used is:
If fuPhotosAdd.PostedFiles.Count > 0 Then
Do Until TempCounter = fuPhotosAdd.PostedFiles.Count
Dim TempImage As New System.Drawing.Bitmap(fuPhotosAdd.PostedFiles(TempCounter).InputStream)
Dim NewImage As New System.Drawing.Bitmap(TempImage, TempImageWidth, TempImageHeight)
If Not Directory.Exists("~/Photos/" & txtRecordNumber.Text) Then Directory.CreateDirectory(Server.MapPath("~/Photos/" & txtRecordNumber.Text))
TempPath = "~/Photos/" & txtRecordNumber.Text & "/"
TempPath = TempPath & txtRecordNumber.Text & " " & FormatDateTime(txtPhotoDate.Text, DateFormat.ShortDate) & " (" & Format(TempPhotoCounter, "000") & ").jpg"
TempCounter = TempCounter + 1
TempPhotoCounter = TempPhotoCounter + 1
Jan 16, 2013 02:07 AM|LINK
Check the MaxAllowedContentLength size in your web config. That might be the problem.
Jan 16, 2013 03:33 AM|LINK
Thanks for the effort, but the solution was related to another setting which I managed to resolve only moments ago.
May 08, 2013 10:59 AM|LINK
Hi can u give me the solution of this problem I have the same problem
May 17, 2013 11:07 AM|LINK
Check the permissions of the folder...