Works a charm locally but as soon as i upload this to the live server (hosted by heart internet) i get:Code:If FileUpload1.HasFile Then Dim filepath As String = FileUpload1.PostedFile.FileName Dim pat As String = "\\(?:.+)\\(.+)\.(.+)" Dim r As Regex = New Regex(pat) 'run Dim m As Match = r.Match(filepath) Dim file_ext As String = m.Groups(2).Captures(0).ToString() Dim filename As String = m.Groups(1).Captures(0).ToString() Dim file As String = filename & "." & file_ext 'save the file to the server FileUpload1.PostedFile.SaveAs(Server.MapPath("../images/") & file) lblMsg.Text = "File Uploaded!" End If
Any advise???Code:Server Error in '/' Application. Specified argument was out of the range of valid values. Parameter name: i Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: i




Reply With Quote