asp-classic

Classic ASP Request.Form not working when using integrated pipeline

此生再无相见时 提交于 2019-12-23 20:08:57
问题 I have a large corp. web site with mixed classic asp and asp.net currently hosted with a Win 2003 server, IIS 6. I need to modify all the pages output with some html modifications regardless the world they comes from. The asp part it's really old and badly structured, thus I can't act on any kind of "general include" to apply all the changes we need. Lastly some asp pages outputs code from multiple OCX/COM objects... We are already planning a whole rewrite/migration to .net, but unfortunately

"Microsoft VBScript runtime error '800a000d' '800a000d'

天大地大妈咪最大 提交于 2019-12-23 20:08:26
问题 I have the next code, which works as follows: Receive some parameters from an url Insert this data into a table called clients Then I select the last data introduced in the clients table At last, it tries to insert this data into another table called users. But I'm getting this error: "Microsoft VBScript runtime error '800a000d' '800a000d' Type mismatch: '[string: "INSERT INTO galileo."]' /createClient.asp, line 50 The line 50 is this one: <% Dim insertaUsuario Set insertaUsuario = Server

Using asp objects in .NET - Max compatibility

三世轮回 提交于 2019-12-23 19:56:27
问题 I have some legacy XSLT scripts that incorporate VBScript in them. They are run on an old system and I can't change that system. I am required to make a change to an XSLT to transform a file differently now. I built a simple .NET project to test my XSLT transform: [STAThread] public static void Main(string[] args) { var transform = new XslCompiledTransform(true); //foreach (var file in System.Reflection.Assembly // .GetExecutingAssembly().GetManifestResourceNames() // ) //{ // Console

CLASSIC ASP - SQL Server does not exist or access denied

爷,独闯天下 提交于 2019-12-23 19:12:09
问题 I'm trying to make a connection to a SQL Server Express DB on localhost, but I get the following error message: Microsoft OLE DB Provider for SQL Server (0x80004005) [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. The code I'm using is Dim connection Set connection = CreateObject("ADODB.connection") connection.connectionString = "server=localhost;Provider=SQLOLEDB;Data Source=RiskManagement;Initial Catalog=RiskManagement;User ID=sa;Password=myPass;"

Write binary data using javascript on the server

五迷三道 提交于 2019-12-23 18:45:35
问题 I'm trying to output a PDF using server side javascript (ASP). The current method I'm using is: xfile=Server.MapPath(lib.fso.GetTempName()) xf=lib.fopen(xfile,"wb"); lib.fwrite(xf,this.buffer); lib.fclose(xf); outB = Server.CreateObject("ADODB.Stream") outB.Type = 1 outB.Open() outB.LoadFromFile (xfile) Response.BinaryWrite(outB.Read()) outB.Close() lib.fso.DeleteFile(xfile); This works, but requires write access on the server. Is there a way to do the same thing without writing to a file? I

Age calculation in years, months, days

巧了我就是萌 提交于 2019-12-23 18:30:07
问题 The following code returns the age from a particular database. What do I add to get the exact date in years, months, days? <%= DateDiff("yyyy",rs("Dateofbirth"),date)%> i.e. result should be 12 yrs 6 months 8 days old. 回答1: DateDiff("d",rs("Dateofbirth"),date) will give you a number of days. DateDiff("m",rs("Dateofbirth"),date) will give you a number of months. So, something like(I don't know exactly what is rs()) : CurrentDate = rs("Dateofbirth") Years = DateDiff("yyyy", CurrentDate ,date)

IIS 5.1 on XP Classic ASP appears to be in single threaded mode

房东的猫 提交于 2019-12-23 18:13:19
问题 I do'nt have script debugging enabled on IIS 5.1 on XP, but the Classic ASP applications appear to be running in single threaded mode. One page must finish loading before another can load. Any ideas??? 回答1: Mike is right, Classic ASP responses are returned in order of receipt (not simultaneously) when being requested by the same session. If you need to do two requests at the same time in the same browser (as your web visitors might need to do if say one of the requests is for an image or AJAX

Classic ASP Error 405

ぐ巨炮叔叔 提交于 2019-12-23 17:24:49
问题 I have several development sites on my wix XP laptop (all classic asp). Doe anyone know why i need to type localhost/site/default.asp (i keep getting a 405 error on iis 5.1) and not just localhost/site 回答1: You need to add "Default.asp" as a default document. From this page ... With iis 4.0 and iis 5.0 the change is performed as follows: Start the Internet Service Manager (Start - Programs - Administrative Tools - Internet Services Manager). Expand the computer and select the web site. Right

Classic Asp date comparison not working correctly

可紊 提交于 2019-12-23 16:33:52
问题 I have seen couple similar titles with my question but they were focused on different point. What I would like to ask is, I'm trying to compare 2 dates. Yes, sounds super simple! Here is the issue: I have two variable and I'm trying to compare this 2 variables with Now(). Just like : If startDate < Now() and endDate> Now() Then do something.... End If But the thing is, when I compare startDate (which is ('2013-08-08 09:30 AM') with Now() and endDate (which is '2013-09-09 02:30 PM') with Now()

Regex in Classic ASP VB

…衆ロ難τιáo~ 提交于 2019-12-23 16:07:22
问题 I just want to match the first instance, could anyone let me know how you would go about doing this? 'RegEx to get Image Dim re, matches, Img Set re = new RegExp ' creates the RegExp object re.IgnoreCase = true re.Global = true re.Pattern = "<img.*(.|\n)*?/>" Set Matches = re.Execute(string) Img = "" For each Item in Matches Img = Item.Value Next 回答1: The Global property should be false , rather than true . The property is described at http://msdn.microsoft.com/en-us/library/tdte5kwf(v=VS.85)