welcome 123
asked on
issue with downloading attachments from database and causing dupliacte errors
The web application I maintain is recently causing the below error looks like for IE 10 and Chrome 32.0.1700.76
The response from the server contained duplicate headers. This problem is generally the result of a misconfigured website or proxy. Only the website or proxy administrator can fix this issue.
Error code: ERR_RESPONSE_HEADERS_MULTI PLE_CONTEN T_DISPOSIT ION
(chrome error) but causing similar to IE also
Below is my code and kindly help me get resolve the issue:
With objAttachment
Response.Buffer = True
byeTemp = .GetLSCBriefingDocument(da tAgendaDat e)
Dim strAttachment As String
If Not IsNothing(.FileName) Then
strAttachment = "attachment; filename=" & .FileName & ";"
Response.ClearContent()
Response.ClearHeaders()
Response.BufferOutput = True
Response.AddHeader("Conten t-Disposit ion", strAttachment)
Response.AddHeader("Conten t-Disposit ion", "inline")
Response.AddHeader("Conten t-Transfer -Encoding" , "binary")
Response.AddHeader("Conten t-Length", byeTemp.Length)
Response.ContentType = .AttachmentType
Response.OutputStream.Writ e(byeTemp, 0, byeTemp.Length)
Response.Flush()
Response.Close()
Response.End()
Else
JavaScriptShowMSG("LSC Briefing Document for this meeting has not been published.")
End If
End With
I tried the below but no luck:
strAttachment = "attachment; filename=" & Chr(34) & .FileName.Replace(",", "_").Replace(" ", "_") & Chr(34)
The response from the server contained duplicate headers. This problem is generally the result of a misconfigured website or proxy. Only the website or proxy administrator can fix this issue.
Error code: ERR_RESPONSE_HEADERS_MULTI
(chrome error) but causing similar to IE also
Below is my code and kindly help me get resolve the issue:
With objAttachment
Response.Buffer = True
byeTemp = .GetLSCBriefingDocument(da
Dim strAttachment As String
If Not IsNothing(.FileName) Then
strAttachment = "attachment; filename=" & .FileName & ";"
Response.ClearContent()
Response.ClearHeaders()
Response.BufferOutput = True
Response.AddHeader("Conten
Response.AddHeader("Conten
Response.AddHeader("Conten
Response.AddHeader("Conten
Response.ContentType = .AttachmentType
Response.OutputStream.Writ
Response.Flush()
Response.Close()
Response.End()
Else
JavaScriptShowMSG("LSC Briefing Document for this meeting has not been published.")
End If
End With
I tried the below but no luck:
strAttachment = "attachment; filename=" & Chr(34) & .FileName.Replace(",", "_").Replace(" ", "_") & Chr(34)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.