asp-classic

ASP “Operation not Allowed” error occured while eecute Request.Form method

别等时光非礼了梦想. 提交于 2019-12-05 14:23:00
I have run the following script for increase the file size for upload E:\inetpub\adminscripts cscript adsutil.vbs set w3svc/ASPMaxRequestEntityAllowed size After running the command.I am getting this error... Request object error 'ASP 0104 : 80004005' Operation not Allowed /ewqms370/common/indexintermediate.asp, line 63 ...for this code here: strUserName=Replace(Request.Form("txtUserName"),"'","''") Can anyone see something wrong??? Jakkwylde What value did you se the AspMaxRequestEntityAllowed property to? Remember that this should be specified in bytes so you may want to double check this.

ASP - How to get URL of Referring Site

爱⌒轻易说出口 提交于 2019-12-05 13:31:05
问题 This is an ASP question, not ASP.Net. Assume there are two sites: www.domain-1.com www.domain-2.com www.domain-1.com has a redirection URL in IIS that points to www.domain-2.com. In www.domain-2.com, I need to know the URL of the referring site (e.g. in this case, it would be www.domain-1.com). How is this done? 回答1: referer = Request.ServerVariables ("HTTP_REFERER") 来源: https://stackoverflow.com/questions/2286327/asp-how-to-get-url-of-referring-site

How can I run sqlcmd.exe from an ASP page?

醉酒当歌 提交于 2019-12-05 13:18:42
As part of our database revision control (and auto-installation) procedures we need to be able run sqlcmd.exe on various .sql files from within an ASP page. The code I'm using to do this is: Dim cmd : cmd = "sqlcmd -S " & DATABASE_SERVER & " -U " & DATABASE_UID & " -P " & DATABASE_PWD & " -d " & DATABASE_NAME & " -i """ & scriptPath & """ -b" Dim wshShell : Set wshShell = Server.CreateObject("WScript.Shell") Dim return : return = wshShell.Run(cmd, 0, True) I have the code working on my development machine (running XP) but now that I've deployed it to our Windows 2003 server it's having

VBScript conditional short-circuiting workaround

倾然丶 夕夏残阳落幕 提交于 2019-12-05 12:51:10
问题 I have a large classic ASP app that I have to maintain, and I repeatedly find myself thwarted by the lack of short-circuit evaluation capability. E.g., VBScript won't let you get away with: if not isNull(Rs("myField")) and Rs("myField") <> 0 then ... ...because if Rs("myField") is null, you get an error in the second condition, comparing null to 0. So I'll typically end up doing this instead: dim myField if isNull(Rs("myField")) then myField = 0 else myField = Rs("myField") end if if myField

Is there any way to check to see if a VBScript function is defined?

為{幸葍}努か 提交于 2019-12-05 12:48:28
问题 This is probably just wishful thinking... Is there any way to check to see if an ASP/VBScript function is defined before calling it? 回答1: It's a slightly hacky way to do it as it relies on having set "On Error Resume Next", but you could do something like this: On Error Resume Next Dim objRef1, objRef2 Set objRef1 = GetRef("DoStuff1") If objRef1 Is Nothing Then Call objRef1 Else MsgBox "DoStuff1 is not defined!" End If Set objRef2 = GetRef("DoStuff2") If objRef2 Is Nothing Then MsgBox

vbscript: getref with parameter

时光毁灭记忆、已成空白 提交于 2019-12-05 12:44:58
has anyone experience with passing a parameter to a function called with getref ? Following code is just an example, doens't work, how to pass the parameter to the mySub sub? <button id="myBtn">Click me</button> <script type="text/vbscript"> document.getElementById("myBtn").onclick=GetRef("mySub") Sub mySub(parameter) alert(parameter) End Sub </script> First look at this article about event handling (anybody knows a better reference?) to get the context for: The code provided in the onclick attribute will be called when the user clicks on the text enclosed in the span. This mechanism is great

Authenticating Website Members as Users in CKFinder v3

余生长醉 提交于 2019-12-05 12:17:37
Before beginning this question, I should point out that my knowledge of ASP.NET & C# is pretty much nil. I'm in the process of trying to integrate the ASP.NET version of CKFinder v3 into a site built in a different language and all is going well so far; I have everything setup as I want it and it's working when I grant unrestricted access to CKF but I'm stuck at the point now of trying to restrict access to it by authenticating only certain members of my site to use it. All the pages that CKFinder appears on on my site are only accessible by those certain members but I need an extra level of

Diagnosing HTTP 500 errors in Classic ASP

允我心安 提交于 2019-12-05 11:02:43
I have recently inherited a website written in Classic ASP, and am currently trying to get a sense of the state of things. The website is working in production, however the development environment (hosting on a Windows Server 2003 box) produces an HTTP 500 error when you try to navigate to it. I realize that HTTP 500 errors just mean that an unexpected server error occurred, and that this also is more than likely the ASP code crashing for one reason or another. I have tried numerous browsers (IE, Firefox, and Chrome) but they all have the same amount of information. Being primiarly an ASP.NET

Migrating from ASP Classic to .NET and pain mitigation

南楼画角 提交于 2019-12-05 11:01:18
We're in the process of redesigning the customer-facing section of our site in .NET 3.5. It's been going well so far, we're using the same workflow and stored procedures, for the most part, the biggest changes are the UI, the ORM (from dictionaries to LINQ), and obviously the language. Most of the pages to this point have been trivial, but now we're working on the heaviest workflow pages. The main page of our offer acceptance section is 1500 lines, about 90% of that is ASP, with probably another 1000 lines in function calls to includes. I think the 1500 lines is a bit deceiving too since we're

Access Database LIMIT keyword

扶醉桌前 提交于 2019-12-05 10:49:30
I'm trying to get my page listing function working in ASP with an Access database, but I don't know the alternative to LIMIT in Microsoft SQL. I have tried TOP but this doesn't seem to be working. Here is the statement am using with MySQL: SELECT * FROM customers ORDER BY customerName DESC LIMIT 0, 5 How can I convert this to work with Access Database? According to ms-access view: SELECT TOP(5) * FROM customers ORDER BY customerName; will fetch an error "The SELECT statement includes a reserved word", the correct syntax is: SELECT TOP 5 * FROM customers ORDER BY customerName; (note the