Posted on: 10/18/2014 12:40:10 PM | Views : 401

Hi.
I Have a page for upload image with FileUpload. I save images in database with unique name.
but i see some images for diffrenet users is common and those users dont upload similar image???
I think Concurrency occured...how I can handle concurrency? my proc for upload is :
Public Shared Sub SaveFile(fileUP As FileUpload, lblMsg As Label, newImg As System.Web.UI.WebControls.Image, prefix As String, traceNo As String, customerType As String, ByVal _UsersLog As UsersLog) Dim r As New Random() Dim imgName As String = traceNo + r.Next().ToString() Dim lMaxFileSize As Long = 812000 Dim extension As String = _ System.IO.Path.GetExtension(fileUP.PostedFile.FileName) If (Not fileUP.PostedFile Is Nothing) _ And (fileUP.PostedFile.ContentLength > 0) Then Try If fileUP.PostedFile.ContentLength ...

Go to the complete details ...