Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have 10TB of client data, spread across hundred of millions of files, avg size 200KB, stored in millions of folders, served from an EC2 instance acting like a traditional NAS, using Windows File System on a Windows Server 2003 R2 EC2 server.

These data are uploaded and downloaded through our Classic ASP site, served from IIS websites, reading/writing data through UNC (network path) to the NAS.

Storage on AWS are expensive (storage+snapshot+ec2), so I would like to move to S3, but still maintain proper security, so files are not available to everyone on the Internet if they know URL.

Any recommendations to this approach? How to maintain support through Classic ASP? Anyone did this storage migration in the past in same Windows environment? How to maintain client security?
Free Tool: IP Lookup
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Hi experts, I wish to put some colspan in a table created from server side as a response of a certain request. My code below is trying to implement such thing but it does not work. Any help please!

            response.write("<th style="" width: 170px; color: black; padding: 1px; text-align: center; colspan: 2; "">" & "Date executed" & "</th>")
            response.write("<th style=""width: 130px; padding: 3px; color: black; "">" & "Notes" & "</th>")


Open in new window

I am looking to create various bar graphs and pie charts on an ASP web page with data from a sql server query.
I have the code below which will detect the browser being used and if it is Safari it will redirect to 'notsupported.html' page.
It works fine when using a computer (PC or Mac), but if u login from a phone using Firefox or Chrome it will still redirect.  How can I prevent this from happening?   I only want to redirect if the user is using Safari, regardless of the devise being used.

		if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) { 
		window.location.href = "notsupported.html";

Open in new window

Hello All,

I am trying to re-direct from Classic asp application to a .aspx page for a File upload. I am receiving following error. Any input of what this error is can be really helpful.

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located.

Source Error:

An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
I want to store HTML code in database.
is it possible? If yes then how?
I am working on a generic VB ASP page for all our sites that will toss up the status code and error message, works great in testing directly to it or redirecting to it...however if I leverage the page as a file, it doesnt execute any of the asp vb code

I wrote it generically so that it could be placed on any of our corporate sites and offer redirection to that applications home root or our corp status uses the following in the code

Code snips

      <meta http-equiv="refresh" content="500;url=https://<%Response.Write(Request.ServerVariables("SERVER_NAME"))%>"/>

      Dim StatusCode
      Dim StatusMessage
      StatusCode=split(response.status," ")(0)
      <h1 style="font-size: 170px;"><%Response.Write(StatusCode)%></h1>
    <p style="width: 400px; margin-left: auto; margin-right: auto; margin-top: 15px;">
        Sorry, but the page you are looking for has not been found. Try checking the URL for an error, then hit the refresh button on your browser. Click the button below to navigate to the <%Response.Write(Request.ServerVariables("SERVER_NAME"))%>:    
    <a class="btn btn-primary m-t" href="https://<%Response.Write(Request.ServerVariables("SERVER_NAME"))%>">Home</a>
      <p> Error Code: <%Response.Write(Response.Status)%></P>
Hi there, just curious if you can use this query or something similar on a remote site?

I have images from my website stored on other webspace

If fs.fileexists("w:\images\stand-"&Stand("stand_type")&".jpg") Then

Open in new window

I have a js that produces a result , say data.

some code
gives data

Now I need to manupulate data in asp
like say

<%response.write left(dataasp,100)%>
 where dataasp=data

Any ideas ?
Hi there.

I have an MS SQL database with a classic asp interface spiced up with Javascript, jquery, VB etc.. I have to create a procedure like this:
User download an Excel spreadsheet, enter some data in predefined columns and upload it to my server via a web interface. Here the data must be imported to a MS SQL database and in the same process be validated against some validation rules like:
only numbers to number fields, values in a certain range etc..
I know it's possible. It doesn't have to be classic asp. It can also be aspx. I'm just not so familiar with aspx yet. My server is a pure Microsoft server with web and database. Anyone who has got a useful guide or can assist with the vital codes to perform this procedure? I have all on a dedicated server.
I look forward to some input. :-)

Best regards

Independent Software Vendors: We Want Your Opinion
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


I want to add a csv file to database. There is a column in csv file called as merchant_id same as column in SQL database. I want to update the row in database if the "merchantid" exists in database or if it doesn't exist , we need to add that row from csv file .


"rs" contains all the columns of the CSV file and its values.

"rsAdd" contains all the columns of Database table(Merchants) and its values.

Set rs = GetRecordSet("C:\upload\new\" & TheNewFileName2)
    'Response.Write "No Errors"
    Set cn = Server.CreateObject("ADODB.Connection")
    i = 0
		TheSql = "SELECT * FROM Merchants"
        Set rsAdd = Server.CreateObject("ADODB.RecordSet")
        rsAdd.Open TheSql, cn
    While not rs.EOF
            For Each col in rs.Fields				
                rsAdd(Replace(col.Name,"_","")) = col.Value
        rsAdd.Move 0        
        i = i + 1
        If (i mod 100)=0 Or i=1 Then
            Response.Write i & ","
            If (i mod 2500) = 0 Then
                Response.Write "<br />"
            End If
        End If
    Set rsAdd = Nothing	
	End If

Open in new window

I know it's kind oldy to use ASP (active server pages) in 2017 but my customer site is built in asp and he does not want to change it.

He asked me to do a form that you can see here

The form is working great.

My problem is with the postback function.

When postbacked, i need the window to go to the field checked and not return to the top of the page. You can for example go to the last record in the form and check yes or no, it will reload as postback, but you will be sent to the top of the page.

here after the complete code

<form id="Form_ID" name="Form_ID" method="Post" action="<%=getsess("currenturl")%>">
            <table border="1" cellpadding="5" cellspacing="2" class="TableContact">     
                dim qConn, qDBC, qSql, qRs
                dim counter : counter = 1
                shopopendatabase qdbc
                qSQl="Select * from questionnaire order by qid ASC" 
                Set qrs = qdbc.execute(qsql)
                if not qrs.eof then
                    do while not qrs.eof
                        StrQuestionLabel(counter) = qrs("question_label")
                        StrQuestionHelp(counter) = qrs("question_help")

                        ' questions principales
                        <td align="cennter" valign="middle"><h3><%=qrs("qid")%></h3></td>
                        <td width="15" align="cennter" 

Open in new window

I had this question after viewing C++ COM Method with Optional Arguments.

I am trying to produce a COM object in Visual C++, where one of the methods accepts optional arguments. Below are the interface declaration, the class implementing the interface, and the implementation of the method taking an optional argument. As it stands, it compiles. But when I try to call the function from an ASP page using VBS with the supposedly optional parameter missing, I get the following error

Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: comObject.ShowFinalSql

Following code in IDL
interface IWPharma : IDispatch{
   [id(2), helpstring("method ShowFinalSql")] HRESULT ShowFinalSql([in] BSTR query, [in] BSTR cleanup);

in C++:
    STDMETHOD(ShowFinalSql)(BSTR query, BSTR cleanup) override

in VB with error:
SET comObject = CreateObject("WPharma.Main")

REM Тест #1
comObject.ShowFinalSql "CHECK_SIGNATURES 01/01/2017", ""
Hello All;

I have a linked Query, that when run, allows me to connect and use the connection to copy data from the LIVE DB to the LOCAL DB.

Create linked DB
exec sp_addlinkedsrvlogin 'NAME-THE-CONNECTION', 'false', NULL, 'USERNAME', 'PASSWORD'

Open in new window

This is the script to copy data from the LIVE to the LOCAL.
insert into LocalTable (uid) select uid from [NAME-THE-CONNECTION].[LIVE-DB-NAME].[dbo].[LiveTable]

Open in new window

I can run the linked table script first in SQL Server, and then run the insert statement, and it works great.
So, my issue is this.

How would I write this to run from within an ASP page, all in one clean process?

Thanks all;
This question is a follow-up to this (solved) one :

My goal was to be able to update records in a Classic ASP application, and that part is fine. The last step in my code is a Response.Redirect statement, which reloads the page after the update. This is fine, but as the form spans more than one page, after the update the user is not returned to the exact point in the page (has to scroll to get to the exact record again).

I looked at the code provided by Wayne Barron ( [*excellent tutorial, btw - thanks!*], and I tried adding an anchor, but this only takes the user back to the top of the form, not to exact point where he left off, after clicking the "Save" button.

As each row of the form has a unique ID (getConID above), I tried using this also, in the redirect statement, but it did not work.

This is the code I use to update a record in the form :

'updateform.asp v03 22-06-2017
getConID = request.form("ID")   'this is the unique row identifier
getCom = request.form("Comment")
getSchoolID = request.form("SchoolID")
' Now update the live TblReportsStoreComments table

Set sqlProp=Server.CreateObject("ADODB.Command")

sqlProp.commandtext="UPDATE TblReportsStoreComments SET txtComment=? where TblReportsStoreCommentsID=? "

Open in new window

I have  sun server that runs a local application that uses the following ports: JMS 5630, XML 9672,
ASP Http 80 and ASP https 443, i can only telnet to port 80, telneting to the other ports I get
unable to connect to remote host: connection refused. I checked the /etc/services and I do not see the ports listed.
BTW: This application used to work without problems...

Hi experts, I need to upgrade high version of excel to export html table to excel. The codes below are able to export from table to excel, How can i upgrade it to high version of excel with an extension .xlsx  ? any help please!

<!DOCTYPE html>
		<title>jQuery Boilerplate</title>
		<script src=""></script>
		<script src="dist/jquery.table2excel.min.js"></script>
    <button class="WinExcel">Export</button>
        <table class="Stocks32">
            <td>Erwin M. Malalis 500</td>
	$(function() {
				exclude: ".noExl",
				name: "Excel Document Name",
				filename: "Prolist",
				//fileext: ".xls",
				exclude_img: true,
				exclude_links: true,
				exclude_inputs: true

Open in new window

!function(a,b,c,d){function e(b,c){this.element=b,this.settings=a.extend({},k,c),this._defaults=k,this._name=j,this.init()}function f(a){return a.filename?a.filename:"Stocks32"}function g(a){var b=/(\s+alt\s*=\s*"([^"]*)"|\s+alt\s*=\s*'([^']*)')/i;return a.replace(/<img[^>]*>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}function h(a){return a.replace(/<a[^>]*>|<\/a>/gi,"")}function i(a){var b=/(\s+value\s*=\s*"([^"]*)"|\s+value\s*=\s*'([^']*)')/i;return 

Open in new window


I have been getting the following error when using trying to upload an image:

Server side error
@Big Monty suggested the following:

1:objUpload = Server.CreateObject("Persits.Upload.1")
2:someFormValue = objUpload.Form("someValue")

Which I have done - now I do not get the error but my values come through as blank..

see my code:

'start the file upload 

strDISKLOCATION  = "\\FFtilsmb4012\Apps$\FORSALE\Uploaded_Images"
	<!-- #include file="../../upload/upload.asp" -->
	<%'Create the FileUploader
	Dim Uploader, File, ErrMsg
	Set Uploader = New FileUploader
	' This starts the upload process


	if varQuery="ForSale" then
	elseif varQuery="Wanted" then
	end if

varUserID = Request.ServerVariables("auth_user")

'Retreive the form variables

varTimeStamp = now()
varDate_Expire = DateAdd("d",31,varTimeStamp)

	 dim oRS2339
     Set oRS2339=server.createobject("ADODB.recordset") "FS_HDR", "dsn=FORSALE;uid=web_Admin;pwd=F1nnforest",1,3

Open in new window

I am getting the following error after completing the form on a contact us web page. This is the error:

ADODB.Fields error '800a0ea5'
Fields update failed. For further information, examine the Status property of individual field objects.
/contactus2.asp, line 33

The email account is on the same server as the webpage and requires authentication. The website was built in asp.

This is the script giving the error:

      'Get Form Variables
customername = Trim(Request.Form("customername"))
email = Trim(Request.Form("email"))
messagetext = Trim(Request.Form("messagetext"))

      'Create and Send E-Mail
Dim objCDOSYSCon
      'Create the e-mail server object
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
      'Out going SMTP server

objCDOSYSCon.Fields("") = ""
objCDOSYSCon.Fields("") = 25
objCDOSYSCon.Fields("") = 2
objCDOSYSCon.Fields("") = 60
objCDOSYSCon.Fields("") = ""
objCDOSYSCon.Fields("") = “**********”
Industry Leaders: We Want Your Opinion!
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Hello All;

OK, this is code that I found a while back, and posted here.
ASP Classic - Insert text, Line breaks and Code

The issue that I had, or am still having now, is that I am giving the user the option to choose the tags they want to use.
They can have as many tags as they need in their post.

The issue with the code in the link above is that it will only do one tag hard coded.
So, that I have done is added an REGGEX into it, and it works GREAT! for the highlighting,
However, adding this in, has messed up the main function of this code FUNCTION, and that is.
It adds the line breaks to everything OUTSIDE of the Code tags.

The REGGEX that I used and works is this.

Function Reggex(strString, strPattern, strReplace)

	Dim RE: Set RE = New RegExp

	With RE
		.Pattern = strPattern
		.Global = True
		.IgnoreCase = True
		Reggex = .Replace(strString, strReplace)
	End With
End Function

fString =   Reggex(fString, "\[code=(.*?)\](.*?)\[\/code=(.*?)\]", "<pre class=""line-numbers"" id=""code""><code class=""language-$1 demo"">$2</code></pre id=""code"">")

Open in new window

The original code is this. (Modified to work in my project)

 	CodeTags(1,1,1) = "[ code=sql]" ' Remove the space between the bracket, 
 	CodeTags(1,2,1) = "[/ code=sql]" ' Remove the space between the bracket, 
 	CodeTags(1,1,2) = "<pre class=""line-numbers"" id=""code""><code class=""language-sql demo"">"
 	CodeTags(1,2,2) = "</code></pre id=""code"">"

Open in new window

This is the entire script.

Open in new window

I'm trying to figure out how to merge for example 4 x 2 .JPGs into one .JPG for use on a website automatically.
I use ASP and VB on my server. Any input would be very nice. I know how to do this in a table, but it will not work in my solution as it is a Flash based slider. Thanks in advance.
How do I reference an xml object inside a function so that after the function runs the xml object is transformed
per the function code as follows


      set xmldoca = Server.CreateObject(objxml)  

      set sbixmla = xmldoca.createElement("sbixml")
      xmldoca.appendchild sbixmla

      xmlarrA = Array("NodeName1~NodeName2~Attribute1:Value1","NodeName2~NodeName3")
      call objectify(xmlarrA)

Function objectifygen(xarray, targnode)
      set objectifygen = targnode

      for each node in xarray
            set n = objectifygen.createElement(split(node,"~")(1))
            objectifygen.selectsinglenode("//" & split(node, "~")(0)).appendChild n
            if ubound(split(node, "~")) > 1 then
                  for a = 2 to ubound(split(node, "~"))  
                        if split(split(node, "~")(a), ":")(0) = "Text" then
                              n.Text = split(split(node, "~")(a), ":")(1)
                              call n.setAttribute(split(split(node, "~")(a), ":")(0),split(split(node, "~")(a), ":")(1))
                        end if
            end if      

End Function

Function objectify(xarray)  
      for each node in xarray  
            set n = xmldoca.createElement(split(node,"~")(1))  
            xmldoca.selectsinglenode("//" & split(node, "~")(0)).appendChild n
            if ubound(split(node, "~")) > 1 then
                  for a = 2 to ubound(split(node, "~"))  
                        if split(split(node, "~")(a), ":")(0) = "Text" then  
                              n.Text = split(split(node, "~")(a), ":")(1)
                              call n.setAttribute(split(split(node, "~")(a), ":")(0),split(split(node, "~")(a), ":")(1))
                        end if
I have classic ASP connects to an Access database and both resides on a web server W2008 R2 64-bit (IIS 7). In IIS Application Pools->Advanced Settings, the 32-bit applications is set to True and Managed Pipeline mode is Classic.

Below is the connection string in ASP.
Dim objConn
  Set objConn = Server.CreateObject("ADODB.Connection")
  objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
               "Data Source= C:\DB\MyDB.mdb"

This setup was working for years till early this week. The ASP can't connect to database anymore. I have to reboot the server then it worked again for a day then stop. Any suggestions?

Thanks in advance!
ASP Script using request from data sent via get can reat using request("data") but if data is sen via post no data is received.

Originated with the get method

Variables are retrieved and the job get done.

Originated with the post method

Variables are not retrieved and the script does not work

Any ideas
Trying to access an Excel spreadsheet through classic ASP that resides on another server.

If I move the spreadsheet to the local server, everything works as it should.  Once the file is put back in the other server's file share, I get an error.

I have changed the Identity in the application pool to a domain account that has access to the file, folder and share and still get an error that is basically access denied.

I used Process Monitor (systernals) to monitor the file.  I indeed get an access denied error. What confuses me is on the Event tab, it shows that it is impersonating my account (which also has access to the file, folder and share). On the Process tab, it shows the same user as the one I used for the application pool.

My question is this.... If the application pool is using a domain user account that has access to a file, and it is impersonating another user that also has access to a file, why am I getting am Access denied error?

Thank you for your time.






Active Server Pages (ASP) is Microsoft’s first server-side engine for dynamic web pages. ASP’s support of the Component Object Model (COM) enables it to access and use compiled libraries such as DLLs. It has been superseded by ASP.NET, but will be supported by Internet Information Services (IIS) through at least 2022.