Re: VBScript error

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Kevin Spencer (kevin_at_DIESPAMMERSDIEtakempis.com)
Date: 01/19/05


Date: Wed, 19 Jan 2005 16:52:16 -0500


> Can anybody tell me what I'm doing
> wrong?

Well, to start with, you're posting this to the wrong newsgroup. Try the
microsoft.public.inetserver.asp.general newsgroup. This is a newsgroup for
ASP.Net.

-- 
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.
"RJT" <rjt@noemail.com> wrote in message 
news:csmgjj02me7@news3.newsguy.com...
> I'm trying to call the following page (VBScript) but I get an Internal
> Server Error 500 in the browser when I try to run this page (it's linked 
> to
> from another page with a submit button).  Can anybody tell me what I'm 
> doing
> wrong?
>
> <%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 = "Download"
>
> strContent = "PckgNew2-r000292.wmv")
>
> strUserName= "1234356"
>
> ' Set the packaging server's private key.
>
> privatekey = "Put server's private key here"
>
> ' 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
>
> 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)
>
> Set objHeader = nothing
>
> Set objDownloadMgr = nothing
>
> %>
>
>
>
> 

Quantcast