VBScript error

R

RJT

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

%>
 
K

Kevin Spencer

Can anybody tell me what I'm doing

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top