asp-classic

Accessing a .NET Assembly from classic ASP

I have been trying to access a .NET Assembly that I have created in classic ASP using dim foo set foo = Server.CreateObject("TestAssembly.MyClass") The problem is I'm getting an error: Server object error 'ASP 0177 : 800401f3' Server.CreateObject Failed /test.asp, line 4 Invalid class string I have registered the assembly (TestA...

Continue a Classic ASP site or insist a language change?

So today I was in a meeting to assist putting together a proposal to give one of our clients on how we can improve their web site. After two hours we had a pretty hefty list of new features and resource upgrades that coupled with their latest request for a site redesign, would put us in a good position to suggest a 'rewrite' in another l...

code critique - am I creating a Rube Goldberg machine?

I'm making a fair amount of calls to database tables via ADO. In the spirit of keeping things DRY, I wrote the following functions to return an array of values from a recordset. Is this hare brained? I use it mainly for grabbing a set of combo-box values and the like, never for enormous values. Example Usage (error handling removed for...

asp errors not displayed

Hi I have moved an sql database from one server to a new one (detached/attached) Now i experience some strange behavior as it does not work but NO error is displayed. This is the code <% const database_dsn="PROVIDER=SQLNCLI10; SERVER=FR-2626\SQLLOP;DATABASE=Lop;Uid=admin-sql;Pwd=xxxx;" response.write "Step 0//" set conn=server.Cr...

Classic ASP: How can I use a value from SQL twice?

I'm very fresh with web dev, but am putting together a simple software catalog with classic ASP. Everything seems fine, except I want to use a value from my SQL database twice on the page. For example, in the page title as well as in the body of the page, however I can only seem to use each value once: .... Set nItem = Request.QuerySt...

Are there restricted characters in ADO varchars?

We have a simple file browser on our intranet, built using ASP/vbscript. The files are read by the script and added to an ADO Recordset (not connected to a database), so we can sort the contents easily: Set oFolderContents = oFolder.Files Set rsf = Server.CreateObject("ADODB.Recordset") rsf.Fields.Append "name", adVarChar, 255 r...

Migrating Classic ASP - Webforms or ASP.NET MVC?

I'm doing some maintenance on a classic ASP application for my client, and as I'm looking through the ASP, the following question comes to mind - would it be easier to convert a classic ASP app to ASP.NET MVC or ASP.NET WebForms? In many ways, it appears that at least the HTML of ASP might be easier to convert to MVC than it would be to...

VB Type Mismatch issues - inArray()

...

Why isn't #Include working on .asp page on IIS7?

SYMPTOM: I have Test_virtual.asp with the following: <body>&nbsp; included content starts here: <!--#include virtual="/test_included.txt"--> </body> test_included.txt contains only: This is the included file When I browse to test_virtual.asp, I don't see the included file's text. POSSIBLE CAUSES I found one report that indicat...

Multiple Classic ASP SessionID's when using both AJAX and standard HTML POST requests.

I'm using Classic ASP and a bit of AJAX to post the contents of a form back to the page on which the AJAX form lives. Upon AJAX POST the page saves one of those fields (email, to be specific) into a Session variable. The user then goes about their business - perhaps requesting the page again via normal HTTP. However, this leaves my brow...

How can I change SQL data order from rows to columns?

I have a snippet of code that writes the data alphabetically from a database ACROSS 3 columns on a web page. Example: a result b result c result d result e result f result g result h result i result I need instead to display it alphabetically DOWN the columns, like this: a result d result g result b result e result ...

Byte array in Classic ASP

How do I write the following code in classic ASP? I am using this code in an include file. byte[] bytes = new byte[stream.Length] Also it would be great if anyone can say how to create object for StreamWriter in classic ASP. Set sw = Server.CreateObject("System.IO.StreamWriter(stream)") I am not sure about the code inside quotes...

Japanese/Chinese language data in SQL Server table

So I've got an interesting problem that I need help with faster than I can get my skills with SQL Server up to par. We have a table that contains a bunch of text, all of it in different languages. Most of this data appears correctly in the browser, however, anything in Chinese or Japanese gets completely mangled by the browser. This i...

ie7 and UTF8 problems in classic asp

I'm having problems with utf-8 coming up as squares in ie7. It works fine in firefox, opera, camino and safari. One of the many characters that I'm trying to use is ✱ - Which is &#10033;. IE7 has this problem with characters used in this notation or pulled from the database (All other browsers display the characters correctly). My hea...

SMTP configuration problem with ASP-Classic

I'm trying to get an email sent using ASP classic, and am having trouble with SMTP configuration. The error: CDO.Message.1 error '80040220' The "SendUsing" configuration value is invalid. The Code(for the email itself): Set objMsg = Server.CreateObject("CDO.Message") objMsg.From = "[email protected]" objMsg.To = "themetatron@...

How can I run sqlcmd.exe from an ASP page? (Free hat)

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 & "...

IIS7 - only serves up one page at a time. It's a making me crAzY!

Situation: Classic ASP application, using a custom Application Pool. Default settings. On some IIS7 machines, IIS decides to serve only one page at a time. So if multiple load any pages from a site, each one has to load in succession. e.g. If I load http://foo.com/default.asp from one browser, and from another machine I load http://...

get new SQL record ID

How can I get back the autogenerated ID for a new record I just inserted? (Using ASP classic and MSSQL 2005) ...

Performance tips for classic asp?

Hi, Today I was tasked to improve the performance of a classic ASP page. Rewriting the code in ASP.NET is at this moment not an option so I took up the challenge to squeeze every ounce of performance I can get out of the page. The page consists of the basic "SELECT bla bla FROM bla" into a couple of recordssets. A while loop iterates t...

Client Certs on IIS - not sure I get it - experiences please ?

Hi - Looking for some advice about the use of client certs to retro-fit access control to an existing app. Our company has an existing intranet app (classic ASP/IIS) which we licence to others. Up till now it's been hosted within each organisation that used it and the security consisted of "if you're able to access the intranet you're a...