By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,401 Members | 793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,401 IT Pros & Developers. It's quick & easy.

VBScript error

P: n/a
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

%>


Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
> 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" <rj*@noemail.com> wrote in message
news:cs*********@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

%>

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.