Download.ForceCompleteDownload
The ForceCompleteDownload property specifies and retrieves a Boolean value that indicates whether the packaged file is downloaded in its entirety to a consumer's computer, regardless of whether there is a full or partial copy of the file in the local cache.
Syntax
Download.ForceCompleteDownload = Boolean
Boolean = Download.ForceCompleteDownload
Parameters
This property takes no parameters.
Return Values
This property does not return a value.
Remarks
If you specify True, the entire packaged file will be downloaded to the consumer's computer. If you specify False, it is possible that a download could be resumed from a previous attempt. For example, a consumer tries to download a packaged file and the transfer is interrupted, but a partial copy of the file is saved in their local cache. If the consumer tries to download the file again, the download could resume where the partial copy stopped.
By default, this property is set to False.
Example Code
<%option explicit%>
<%Response.Buffer = True%>
<%
' Declare objects and variables.
Dim strPath, strContent, strUserName, publickey, privatekey
Dim objDownloadMgr, objHeader, strHeader
' Retrieve end user and file information from the form.
strPath = Request.QueryString("path")
strContent = Request.QueryString("content")
strUserName= Request.QueryString("username")
' Create a download manager object.
Set objDownloadMgr = Server.CreateObject("wmrmobjs.reheader")
' Create a header object.
Set objHeader = Server.CreateObject("Wmrmobjs.WMRMHeader")
' Place header information into the header object.
strHeader = objDownloadMgr.GetDRMHeader(strPath+"\"+strContent)
objHeader.Header = strHeader
objHeader.Attribute("UserName") = strUserName
privatekey = "XXX" ' XXX is the packaging server's private key.
objHeader.Sign(privatekey)
strHeader = objHeader.Header
' Add the header to the Response object.
Response.AddHeader "Content-Disposition", _
"attachment;filename="+strContent
' Force the end user to download the packaged file.
objDownloadMgr.ForceCompleteDownload = True
' Download the file.
call objDownloadMgr.DownLoad(strPath+"\"+strContent, strHeader)
%>
Requirements
Version: Windows Media Rights Manager 7 SDK or later
Reference: DRMReheader 1.0 Type Library
Library: wmrmrehd.dll
Platform: Windows Server 2003
See Also