I am getting a 404 serving a PDF file

The file exists I can go to IIS , content view, right click, BROWSE and the pdf shows as expected. Other PDFs in this directory are behaving corectly.

Any ideas what could be wrong? The name of the file is this

2016 10 27  WO 43337 Ski Insp.pdf

My doc links have an onClick that shows the doc in a different window. Again, all this works well. Many other documents are working correctly.

Public Function ShowAttachmentJS(Attachmentid As Integer) As String
    Dim a As Attachment = Attachment.AttachmentById(Attachmentid)
    Return "javascript:window.open('" & ShowAttachmentURL(a) & "','','');return false;"
End Function

'//this has to be here cause it needs the page object to resolveurl
Public Function ShowAttachmentURL(a As Attachment) As String

    Dim s As String = String.Format("~/attachments/{0}/{1}", a.FolderFromDocType(), a.FileName)
    Return Me.ResolveUrl(s)

End Function

Related posts

Recent Viewed