asp-classic

why are docx files corrupted by binary post, but .doc and .pdf are fine?

邮差的信 提交于 2020-01-03 05:19:21
问题 I'm posting files to an API in binary format. .pdf and .doc files are fine - they arrive in the system as expected and open up without any problems. But for some reason, .docx files show up as corrupt. Why would that be? Sub PostTheFile(CVFile, fullFilePath, PostToURL) strBoundary = "---------------------------9849436581144108930470211272" strRequestStart = "--" & strBoundary & vbCrlf &_ "Content-Disposition: attachment; name=""file""; filename=""" & CVFile & """" & vbcrlf & vbcrlf

Can I generate JSON from “Classic” ASP on IIS?

限于喜欢 提交于 2020-01-03 04:53:06
问题 I have some logic I want to run on the server-side. It's implemented in Javascript, and I'd like to use it to generate and emit JSON, to allow a REST-api for a web app I'm producing. Development is on Windows7 and IIS. I know IIS still supports ASP, which can be implemented in Javascript. Is it possible for an ASP classic page to emit JSON? 回答1: Yes, no problem. It's possible to use the well-known json2.js from json.org within a Javascript-based "classic ASP" page. Per ejemplo: <%@ language=

how to trap an error and save error detail in database and redirect to custom error page in classic asp?

故事扮演 提交于 2020-01-03 04:50:15
问题 how to trap an error and save error detail in database and redirect to custom error page in classic asp? I want that I should include a asp page in all page of my website and if any error occur it get that error detail, saved it to database or mail it to mail id and redirect to custom error page. Please if you have any idea then please help me. 回答1: Classic ASP has no try/catch. It also uses VBscript by default and the answer above is, I'm guessing, C#? Here is VBscript ASP for what you are

Post to facebook wall with classic ASP

本秂侑毒 提交于 2020-01-03 02:42:12
问题 I have a problem posting to facebook wall with classic asp. The variables fbName, fbUserID, accessToken are set in "real life" - i just deleted it here. I have the correct permissions for posting to a users wall ("publish_stream"). The post is not posted on the facebook wall of the user. Did I make any mistakes? fbName = "" fbUserID = "" accessToken = "" strURL = "https://graph.facebook.com/" & fbUserID & "/feed" strMessage = fbName & " just did something." strLink = "http://www.orf.at/"

Submitting to Twitter with Classic ASP

微笑、不失礼 提交于 2020-01-03 01:48:25
问题 I am trying to implement twitter posting on a website. when a user posts an alert and they check off "submit to twitter" I want to send the contents of the box (140 chars of it) to the associated twitter account. So I've done the following: Registered a new app in twitter Gotten all of my tokens/keys Set up the following library: http://scottdesapio.com Changed all of the parameters per the instructions Every time I try to submit, though, I'm getting an "Could not authenticate with OAuth"

IIS server redirect locations

三世轮回 提交于 2020-01-02 21:50:51
问题 I got a asp site hosted in a iis server. In the server there is a virtual folder products and whenever a url like xyz.com/products/abc_11.asp is provided it is forwared to xyz.com/product.asp?id=11 page. I would like to know from where we can change that settings? These settings or tasks can be done from where? Thnx 回答1: Does the folder "products" or file "abc_11.asp" physically exist on the webserver? There are many ways to accomplish the task of having a sepcific url forward to another url.

Classic ASP error line 0 column -1

家住魔仙堡 提交于 2020-01-02 10:34:53
问题 We run a busy website built on classic ASP (for all sorts of legacy reasons). During busy periods we're seeing an unexplained error and can't get to the bottom of it. It manifests by IIS 7 triggering our custom 500 error page. On this page we gather as much detail about the error as we can, using both the ASPError object and the err object. What we emerge with is: From the ASPError object: ASPCode: 0 Category: Source: Page: Description: Line: 0 Column: -1 In the err object, err.Number, err

Classic ASP error line 0 column -1

南楼画角 提交于 2020-01-02 10:31:42
问题 We run a busy website built on classic ASP (for all sorts of legacy reasons). During busy periods we're seeing an unexplained error and can't get to the bottom of it. It manifests by IIS 7 triggering our custom 500 error page. On this page we gather as much detail about the error as we can, using both the ASPError object and the err object. What we emerge with is: From the ASPError object: ASPCode: 0 Category: Source: Page: Description: Line: 0 Column: -1 In the err object, err.Number, err

Utilize ADO.NET within Classic ASP script

左心房为你撑大大i 提交于 2020-01-02 09:57:56
问题 I'm writing some simple queries which return a single value and I'd like to get the ADO.NET ExecuteScalar method's behavior from Classic ASP's ADO libary. However, I'd prefer to not re-invent the wheel. Is it possible to instantiate ADO.NET's Command object within classic ASP? If so, how would I go about doing that? If I do need to re-implement this feature, what is the best way to do that? Here's what I'm trying to do (In VBScript): set cmd = Server.CreateObject("ADODB.Command") cmd

Utilize ADO.NET within Classic ASP script

↘锁芯ラ 提交于 2020-01-02 09:57:10
问题 I'm writing some simple queries which return a single value and I'd like to get the ADO.NET ExecuteScalar method's behavior from Classic ASP's ADO libary. However, I'd prefer to not re-invent the wheel. Is it possible to instantiate ADO.NET's Command object within classic ASP? If so, how would I go about doing that? If I do need to re-implement this feature, what is the best way to do that? Here's what I'm trying to do (In VBScript): set cmd = Server.CreateObject("ADODB.Command") cmd