We have a problem where in the user can download files from an email. A link that will redirect to a page where the code to download the file resides. Before the download the user needs to be logged in to the system for security. The problem is that sometimes for whatever reason when the user clicks the link the download dialog box does not appear and just a blank white page. It happens only on our staging environment where we have 3 servers.. We can't reproduce this in our dev and test env. where we only have one server.
We need help.. thanks.
Below is the actual code.
Private Sub DownloadFile()
Dim path As String = ConfigurationManager.AppSettings("JobApplicationDocuments")
path &= applicationClientId & "\" & jobId & "\" & jobApplicationId & "\" & fileName
If (System.IO.File.Exists(path)) Then
Dim fs As System.IO.FileStream = System.IO.File.OpenRead(path)
Dim file As System.IO.FileInfo = New System.IO.FileInfo(path)
If file.Exists Then
Response.AddHeader("Content-Disposition", "attachment; filename=" & orginalFileName.Replace(" ", "_"))
View Complete Post