D
Do
I keep getting this error message when I hit refresh in the browser when I
run this code.
"The file is currently open and cannot be read."
I usually kill the objects after I've read through them.
Is there something I'm missing?
Try
'Run document security check
Dim objDocUser As New user
Dim objFileProps As New PropertyReaderClass
Dim objPropReader As DocumentProperties
Dim strFolder As String
strFolder = Server.MapPath("../files/")
objPropReader = objFileProps.GetDocumentProperties(strFolder &
Request.QueryString("filename"))
Response.Write(objPropReader.Title())
objPropReader = Nothing
objFileProps = Nothing
'*********************
'Document security check should only be run against the forms authentication
ticket
'Remove the querystring, this is not for security
If objDocUser.isfoldermember(Request.QueryString("folderid"), objUser.Name)
Then
lblDownload.Text = "<a href='../files/" & Request.QueryString("filename") &
"'>Download Now >></a>"
Else
lblDownload.Text = "<B>You do not have rights to download this
document.</B>"
End If
objDocUser = Nothing
Catch ex As Exception
lblMessage.Text = ex.message
End Try
run this code.
"The file is currently open and cannot be read."
I usually kill the objects after I've read through them.
Is there something I'm missing?
Try
'Run document security check
Dim objDocUser As New user
Dim objFileProps As New PropertyReaderClass
Dim objPropReader As DocumentProperties
Dim strFolder As String
strFolder = Server.MapPath("../files/")
objPropReader = objFileProps.GetDocumentProperties(strFolder &
Request.QueryString("filename"))
Response.Write(objPropReader.Title())
objPropReader = Nothing
objFileProps = Nothing
'*********************
'Document security check should only be run against the forms authentication
ticket
'Remove the querystring, this is not for security
If objDocUser.isfoldermember(Request.QueryString("folderid"), objUser.Name)
Then
lblDownload.Text = "<a href='../files/" & Request.QueryString("filename") &
"'>Download Now >></a>"
Else
lblDownload.Text = "<B>You do not have rights to download this
document.</B>"
End If
objDocUser = Nothing
Catch ex As Exception
lblMessage.Text = ex.message
End Try