asp-classic

Classic ASP global.asa SQL Server 2008 connection string

◇◆丶佛笑我妖孽 提交于 2019-12-13 00:28:10
问题 I have been given a web application written in Classic ASP to port from Windows 2003 Server (SQL Server 2000 and IIS 6) to Windows 2008 Server (SQL Server 2008 and IIS 7.5). The site uses a GLOBAL.ASA file to define global variables, one of which is the connection string ( cnn ) to connect to SQL Server. Below is the (old) connection string from GLOBAL.ASA : Sub Application_OnStart Dim cnnDem, cnnString Set cnnDem = Server.CreateObject("ADODB.Connection") cnnDem.CommandTimeout = 60 cnnDem

Looking for a very simple spam-prevention class/function for ASP Classic

好久不见. 提交于 2019-12-13 00:17:15
问题 I am looking for a very simple solution to prevent (or reduce) form spamming. I've got quite a few ASP classic applications that contain contact us/miscellaneous forms here and there that generate emails. Few of them have been caught by spam bots and are being abused. I need very simple solution(s) to reduce spam if not eliminate it. Audio/Visual CAPTCHAs are out of question as visitors will end up spending more time solving captchas than to use the form itself. Session/timestamp/javascript

Loop throught a description, find a string and count

十年热恋 提交于 2019-12-13 00:11:11
问题 I have a table with, for this example, 2 columns: Person Description I need to create a result table like this: Person Yes No Total John 1 5 6 Laura 4 9 13 Peter 0 1 1 Total 5 15 20 The person I get it straight, but for the description I have to do a check if there is a date inside the string, Nathan Rice helped me here about it: Get a range date and search a string. One Person can have N descriptions, so I need to loop it. If the date was found in description add 1 to Yes, else add 1 to No.

ASP Include file not found

与世无争的帅哥 提交于 2019-12-12 21:12:48
问题 I am a Systems Administrator (not for a company just work for a 3rd party company), and having an issue with an error that i receive on the server side when browsing his website from the server. Error Active Server Pages error 'ASP 0126' Include file not found /login.asp, line 3 The include file '/includes/connect.asp' was not found I enabled parent paths in IIS 7 but it stills errors out. I am not a ASP guy at all, but all things in IIS looks ok. Is it his code? Anything he could try? Had a

How many different places do you have to set date formats in IIS 7.0 and win2k8

送分小仙女□ 提交于 2019-12-12 21:06:44
问题 I am trying to migrate an old classic asp application to IIS 7.0 with win2k8 and I definately don't want to change the old code if I can help it. I have set a date format in the Customise Regional Options in the Date formats in the regional and and language options in the control panel to dd-MMM-yy. I am still getting Conversion_failed_when_converting_datetime_from_character_string errors using this date format even after reboots. I am using also using SQL Server Express 2005. Where else do

How do I match [Any Character Except X] in a regular expression?

夙愿已清 提交于 2019-12-12 20:26:00
问题 Is there are way to do this? So if X is the unwanted character, I'd be looking for something like (.*[^X]) The aim is to match every character in a string until an X turns up. I've searched high and low, but can't find the answer. 回答1: To match everything up to a certain character X , the simplest should be; [^X]* Simple refiddle to show it. 回答2: Another flavour, which is close to what you had in mind originally: (.*?)X Greedy capture ? is the trick here. You will need to take the first

ASP Classic and JavaScript check for session status

不羁的心 提交于 2019-12-12 20:18:37
问题 I am in need of some help with trying to figure out how to go about checking the users session and seeing if they are still logged in or not. The problem being is because i have a static page that pretty much loads everything into "tabs" using jquery. So when the user navigates the page, it really never leaves that same page they started out on. Hints my problem in trying to determine if they are still logged in or not when they click on update their information on their profile or whatnot.

How can I determine file encodings on Windows / IIS?

被刻印的时光 ゝ 提交于 2019-12-12 19:15:13
问题 From the answers to this question it appears there's a file somewhere on our server that's been saved with the wrong encoding. I've seen this happen before - most often when pasting from Word into Visual Studio, when "smart quotes" can interfere with Visual Studio's encoding settings when saving the file. Thing is - the problem I'm having involves 20-30 different script files, include files and so on (hey, that was how we kept it modular back in the day...) and I really don't want to open

Pass date to ADODB.Command parameter from JavaScript

喜你入骨 提交于 2019-12-12 18:24:04
问题 Using old-timey classic ADO, not ADO.NET, how do you pass a date value to a stored procedure from JavaScript? The JS is running in a classic ASP page on IIS7. SQL Server is 2012 (1). SOLVED: See answer below. Long story short, the results were finding their way back to me via a JSON stringifier that ignored properties with variant date values. I have a stored procedure in SQL Server: create procedure test(@n int, @d datetime) as begin select @n n, @d d; end; And I have some JavaScript code in

C# COM objects with VB6/asp error

雨燕双飞 提交于 2019-12-12 18:07:51
问题 I'm trying to expose a C# class library via COM so that I can use it in a classic asp web site. I've used sn - k, regasm and gacutil. About all I can do now though is echo back strings. Methods which take Class variables as input are not working for me. ie my test method EchoPerson(Person p) which returns a string of the first and last name doesn't work. I get a runtime error 5 - Invalid procedure call or argument. Please let me know what I am missing. Also I have no intellisence in VB. What