473,320 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

VBScript error

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
1 1339
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: John Davis | last post by:
When I create new documents in Dreamweaver, there are several choices for ASP creation: ASP JavaScript: run at client side?? ASP VBScript: run at server side?? ASP.NET C# ASP.NET VB I don't...
29
by: Christopher Brandsdal | last post by:
If I have a .ASP page that runs JScript code - is it possible to include an ..ASP page that runs VBscript???
16
by: Mike Schinkel | last post by:
Does anyone know if there are bugs in VBScript's GetRef()? I'm using VBScript Version 5.6.8515 on Win2003Server w/ASP. Sometimes it returns an object that VarType() says is a vbObject. Other...
1
by: Ana Rita | last post by:
Hello to all. I'm trying to do call a vbscript sub in one page aspx. My vbscript sub is in a file with the extension (vbs) and it looks like this: Sub Mens (strmens) Msgbox strmens
2
by: Jessard | last post by:
Help! Hi, I'm having a bit (well a lot - it's getting annoying) of trouble using a C# class library within a VBScript on a computer other than the development machine. All the class is needed...
4
by: chris.dunigan | last post by:
I'm looking for an example of how to execute an existing DTS­ package from an ASP (VB)script and would appreciate any and all response. ­I don't even know if it's possible Thanks - Chuck...
3
by: Joe Caverly | last post by:
Hi, I'm using Visual C++ 32-bit Professional Edition 5.0 Using Microsoft Knowledge Base Article 181473 as a basis, I'm trying to transform this VB Code; Dim sc As Object Dim code As String...
2
by: Beemer Biker | last post by:
I put together a few lines of vbscript so I could dump the contents of a string to my C drive. It worked fine in a small test.htm where I put the vbscript at the top of the file. It failed to...
0
by: thisis | last post by:
Hi All, I'm getting an error on my ASP page: Microsoft VBScript runtime error '800a000d' Type mismatch: 'StoreFileIntoField' I assume - 99.5% - the error is generated because of worng...
1
by: Andrew Wan | last post by:
How can VBScript code access JScript code variables in the same ASP page? <SCRIPT LANGAUGE="VBScript"> Dim a a = 10 </SCRIPT> <SCRIPT LANGUAGE="JScript"> Response.Write(a); </SCRIPT>
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.