This is a migrated thread and some comments may be shown as answers.

Problem with Radupload control

3 Answers 62 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
prachi s
Top achievements
Rank 1
prachi s asked on 06 Jul 2010, 06:21 AM
I have problem with RadUpload control i.e. some times it fires error as "Argument must be greater than or equal to zero"
But some times it works.
Try  
If RadUploadAlbum1.UploadedFiles.Count > 0 Then  
                Dim data As Byte() = New Byte(RadUploadAlbum1.UploadedFiles(0).ContentLength) {}  
                RadUploadAlbum1.UploadedFiles(0).InputStream.Read(data, 0, data.Length)  
                Session("DataVB") = "images/Profile/Album1/" & RadUploadAlbum1.UploadedFiles(0).GetNameWithoutExtension & RadUploadAlbum1.UploadedFiles(0).GetExtension  
                OldFile = Server.MapPath("~") & "\images\Profile\Album1\" & RadUploadAlbum1.UploadedFiles(0).GetNameWithoutExtension & RadUploadAlbum1.UploadedFiles(0).GetExtension  
                NewFile = Server.MapPath("~") & "\images\Profile\Album1\" & Session("ProfileId") & RadUploadAlbum1.UploadedFiles(0).GetExtension  
                If File.Exists(NewFile) Then  
                    File.Delete(NewFile)  
                End If  
                File.Move(OldFile, NewFile)  
                ImgAlbum1.ImageUrl = "" 
                ImgAlbum1.ImageUrl = "~/Images/Profile/Album1/" & Convert.ToInt64(Session("ProfileId")) & RadUploadAlbum1.UploadedFiles(0).GetExtension  
                db.WebActivityLog("Image upload ", "Done Sucessfully", Session("ProfileId"), True)  
            End If  
Catch ex As Exception  
            db.WebActivityLog("Image upload", ex.Message, Session("ProfileId"), False)  
        End Try 

because of this image doesn't  get upload..

please help me..

 

3 Answers, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 06 Jul 2010, 04:54 PM
Hi prachi s,

At which line do you receive the error mentioned?


Sincerely yours,
Genady Sergeev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
prachi s
Top achievements
Rank 1
answered on 07 Jul 2010, 06:40 AM
Hi Genady Sergeev ,

It is not giving error while debugging code but it raise error when it will get publish,
that's why i m not able to say at which line i receive the error mentioned.
And it occures some times that's why its also immpossible to say in which senario error occured.
0
Genady Sergeev
Telerik team
answered on 09 Jul 2010, 02:26 PM
Hello prachi s,

Your code looks pretty fine. Without debugging or somekind of tracing it is hard to say where the exact error comes form. Could you please try setting a log entry after each line so that we can see where is the error exactly thrown? Also, could you try publish your site on internal server with debug=true in the web.config, just for the sake of testing and paste here screenshot of the stack trace. Thank you.

Kind regards,
Genady Sergeev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
prachi s
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
prachi s
Top achievements
Rank 1
Share this question
or