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 a classic ASP web page that uses Jmail to send messages.  The hosting company did a upgrade on their server a week ago. My script continued to work until today. I was told I should try using SMTP authentication instead of LocalHost.  No luck. Getting error message.  

ERROR: SendJmail The message was undeliverable. All servers failed to receive the messageSent as plain text.

Can someone tell me if I made the right changes?

The line Mailer.ServerAddress = "localhost"

Was replaced with the following lines

mailer.serverAddress = ""
mailer.port = 25
mailer.username = "[my email address]"
mailer.password = "[my password]"
Cloud Class® Course: MCSA MCSE Windows Server 2012
LVL 12
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

I've got a website on shared hosting platform that I think go messed up when they updated the .net framework on the server.  I have several sites that are currently not working correctly.  I don't have direct access to the server so that kind of makes it difficult to troubleshoot directly.  So I have to keep emailing their support.

The site I am currently having an issues with is, I use a framework from for my database calls, it uses a combination of javascript and for the functions.  The site is written in classic asp.  So what started happening is my asp database driven sections aren't working.

I get this error: 006~ASP 0178~Server.CreateObject Access Error~The call to Server.CreateObject failed while checking permissions. Access is denied to this object.

The developer(dmxzone) believes the issue is with the permissions on the should have read/read&execute.

I'm at a loss of what to do or direction to take.  If you load just this page: it will show you all the errors being kicked up.  Sites worked perfectly until the .net updates.

{"type":"Error","fileName":"lib/core/parser.asp","lineNumber":86,"message":"006~ASP 0178~Server.CreateObject Access Error~The call to Server.CreateObject failed while checking permissions. Access is denied to this 

Open in new window

Hi there, I was wondering if someone can help me/guide me in the right direction of a crypo currency API and a script (or alter an existing script) to call the data

I have found this Crypo API - (


The script I already have, uses a currency API to get the data and I was wondering if it is possible to modify this (this script was built by someone else):
	Dim oJSON
	Set oJSON = New aspJSON

	Set oConn=Server.CreateObject("ADODB.Connection")
	oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("core/allcore.mdb")

	Set Currencies=oConn.Execute("SELECT ticket_curr FROM tickets WHERE ticket_from>Now() AND ticket_live=TRUE AND ticket_soldout=FALSE Group By ticket_curr Order By ticket_curr")
	Do Until Currencies.EOF
	If CurrCount=0 Then
	End If
	Set CheckCurr=oConn.Execute("SELECT * FROM site_curr WHERE curr_ID='"&Currencies("ticket_curr")&"'")
	If CheckCurr.EOF Then
		oConn.Execute("INSERT INTO site_curr(curr_ID) VALUES('"&Currencies("ticket_curr")&"')")
	End If

	Set oXMLHTTPClient=CreateObject("MSXML2.ServerXMLHTTP")

Open in new window

Hi EE! :)

Our website has been working flawlessly until recently - we noticed that some pages began to intermittently load slowly, hanging for somewhere between 10-30 seconds, sometimes loading successfully after a considerable wait, but in many cases leading the application in the app pool to hang for a long time, and sometimes requiring a manual restart of IIS. Even restarting IIS takes a long time when it's hanging.

The website is several years old and coded in classic ASP/VB - the pages seemingly causing the bother are fairly heavy ones in regard to sever side code with lots of recordsets etc, but have NEVER caused any problems until the last couple of weeks or so.

The website app runs in 32bit compatibility mode set in the IIS apppool (We use 32bit mode as we're connecting to a 32bit mysql database on another server via win-mysql 32bit ODBC connector)

Where things stand currently:

  • No changes have been made to our classic ASP application source code.
  • No applications were installed recently on the server.
  • No changes made to the website conf/app in IIS
  • Disk space looks fine. Disk check OK. CPU looks OK.

What I have done so far without success:

  • Deleted website & app in IIS and recreated.
  • Isolated website in IIS - turned all other websites and apps off.
  • Uninstalled windows updates < 80 days (I have since reinstalled after discovering it made no difference)
  • Performed a system restore of server state/config < 75 days
I have an ASP page where I am using vbscript to add records to an access database and that is working well, however I only want to add the records if there has been no entry for that day. The access table has a field called EntryDate and its default value if the short date so I was wanting to use this field to determine if anything had been written to the database on the current day based on this. Below is the code that adds the record.

		sql = "Select * FROM tblData;"
        'set OpARS = server.createobject("adodb.recordset") sql,dbAConn,adopenkeyset,adlockoptimistic

'Server Side form validation to keep our database clean
dim Site, Availability, Reliability, Efficiency, NminusXST, ProdctLoss, MoneyLoss, Comments

User = vFullName

'If we pass through validation then store the information in the db

OpARs("User") = User
OpARs("Site") = Site
OpARs("Availability") = Availability
OpARs("Reliability") = Reliability
OpARs("Efficiency") = EffSite
OpARs("NminusXST") = NminusXST
OpARs("ProductLoss") = ProductLoss
OpARs("MoneyLoss") = MoneyLoss

RecID = OpARs("ID")


Open in new window

was thinking if using something like IF NOT EXISTS(Select * FROM tblData WHERE EntryDate < Date();)
Hi Experts,
I am submitting Username and Password to a database table with Classic ASP. This is my form:
<form name="form" method="post" action="Passwords_send.asp">
Username: <input name="Username" type="text" id="Username" /><br />
Password: <input name="Password" type="text" id="Username" /><br />
<input type="submit" name="Submit" value="Submit" />

Open in new window

Below is the code that sends the Username and Password to the database:
<!-- #include virtual="/Connections/SQLConn.asp" -->
strUsername = request.Form("Username")
strPassword = request.Form("Password")

'create connection object
Set MesIns=CreateObject("ADODB.Command")
MesIns.commandtext = "insert into Login (Username, Password) VALUES (?,?)"
MesIns.Parameters.Append MesIns.CreateParameter("@Username", 200, 1, 999, strUsername)
MesIns.Parameters.Append MesIns.CreateParameter("@Password", 200, 1, 255, strPassword)


Response.Redirect "Passwords.asp"

Set conn = Nothing

Open in new window

I would like the Username and Password be encrypted. How can I achieve this?
Thank you for your help.
I have a classic ASP page that grabs data from 4 different excel sheets and displays them in a table. what I want to do is since I am pulling pieces of data from 4 different sources I would like to then take the consolidated pieces of data and as it is loaded to this ASP page, also add it to a Access table so i then will have a single source for this particular data. the make up of the ASP page is as follows:
Each row of data in this ASP is placed into a <form name="Form1"> </form><form name="Form2"></form> and so on all the way to form11. so what I have tried to do is at the beginning of the page before the <html> tag i have all my connection strings to each of the excel sheets and this one for the access database:
vMdbFile = Server.MapPath("/virtual/data/BusinessDash.accdb")
	vConnStr = "Provider=Microsoft.Ace.OLEDB.12.0;Persist Security info=False;Data Source=" & vMdbFile	

		'Open Database Connection
		Set dbAConn = Server.CreateObject("ADODB.Connection")
		dbAConn.Open vConnStr
		set OpARS = server.createobject("adodb.recordset")

Open in new window

then down in each of the <form> tags just before the </form> tag so it is after all the other data is pulled from the excels I have:
		sql = "Select * FROM tblData;"
        'set OpARS = server.createobject("adodb.recordset") sql,dbAConn,adopenkeyset,adlockoptimistic

dim Site, Availability, Reliability, Efficiency, NminusXST, ProdctLoss, MoneyLoss, Comments

User = vFullName
Site = 

Open in new window

Hi all, I was curious to see if there was a simpler way to change a date format...

I recently have moved my website to a US server and now the date is backwards (MM-DD-YY)

What I code I was using was (DD-MM-YY):
"&Date(*some date*)&"

Open in new window

Is there an easy way to change it back to this format?

Or do I need to do:
"&Day(*some date*)&"/"&"&Month(*some date*)&"/"&Year(*some date*)&"

Open in new window

Any help would be great
Hi, Experts, My code below is working but having so much delay in terms of response. Is there any other way here to achieve the goal but not having so much delay? This is the scenario, I have two table Stock, and ActualCount. They have common field, Procode. First, I need to loop the Stock and each procode of it  will be going to check in table ActualCount to check the status. The code below is having so much delay and sometimes receive an error response from the server. Any help please!

On Error Resume Next
dim theServer, dsqty, cntcode, qty, pcode, x

cntcode = request.querystring("b")
deptcode = request.querystring("c")

Set rs = Server.CreateObject("ADODB.Recordset")
set cn=Server.CreateObject("ADODB.Connection")
cn.ConnectionString = "driver={SQL Server};server=" & "MyNoteBook" & "\SQLEXPRESS;uid=sa;pwd=3808;database=" & "Winz" & ";ConnectionTimeout=10;"

If Err.Number <> 0 Then
    Response.Write(  Err.Number & "|" & Err.Description )
End If
   Set rs = cn.Execute("Select * from Stock where DPTID='" & deptcode & "' and Own='" & "Men" & "' And Active='" & "Yes" & "' order by proname asc")
      with rs
         If rs.BOF = True Then 'No record
             response.write("No records!")
      response.write("<table style=""width:890px; height: 600px"" id=""CountesStock"" class=""PoRaX"">")
         response.write("<thead style=""width:890px;"">")

Open in new window

I want to show a modal popup button when regular asp button clicked.   using .....Help!!

Sample below:
asp button
 <asp:Button ID="extButton" runat="server" Enabled="False" Visible="false" Text="Click to Invite External" /></button>

Open in new window

-- popover button hidden until this button active and clicked

<div style="text-align:center; margin-top:10%">

<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#demoModal" id="">Click to enter Extended Client Name</button></button>


Open in new window

- This button will appear ready to show modal content

Modal Function
<script type="text/javascript">

        $(function () {

            $("#btnShow").click(function () {





Open in new window

Cloud Class® Course: Microsoft Office 2010
LVL 12
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

I am having a hard time creating a site map with  Could it be because I have several pages (including the home page) that were made with Mobirise and the rest are classic asp pages?  I've tried several online xml site map creators and none seem to be working for me.

I need to write this code in global.asa. GetLastDateandTime is working fine. I need to put that in the session. If user is present then we get the data from the database. This function is working fine. If user is not present then we are using update function. My update function is not working. Page is down. I am not sure how to fix the update function.

Sub S[b]ession_OnStart[/b]

Dim objConn, objRs, strConn

Set objRs = Server.CreateObject("ADODB.Recordset")

Set objConn = Server.CreateObject("ADODB.Connection")                                                                                     


strConn = "test;"


objConn.Open strConn

dim strUser

strUser = request.servervariables("logon_user")

dim strDateAndTime = Now()       

If (strUser <> "" ) then

    Session("LastDateTime") = GetLastDateandTime(strUser, objRs,objConn)

   UpdateLastDateAndTime(strUser, strDateAndTime, objRs,objConn);[/b]

End If


Set objRs = Nothing

Set objConn = Nothing

End If


End Sub



Function GetLastDateandTime( ByVal strUser, ByRef objRs, ByRef objConn)



    Dim cmd


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

       Set cmd.ActiveConnection = objConn


       cmd.CommandText = "usp_GetLastDateandTime"


Open in new window

I am in the process of migrating some classic ASP applications from Windows Server 2003 to Windows server 2012.

I have managed to get a basic ASP page to run - however when I try and run a page that access's an SQL database I get this error:

error '80004005'
/apps/Retail_Helpdesk/frames/frameoverall.asp, line 17

Line 17 refers to the database connection in my code:

Classic ASP Error
I have setup the ODBC connection to the database and have tested it - it works ok.

I am hoping that someone will know a way of fixing this one.


How to display the Session Timeout Warning Dialog in Classic asp? I want to display the session timeout warning at 13 minutes and session will  timeout at 15 minutes.

Dialog will have yes and no buttons. Yes button will again extend the session and No button will just cancel the dialog and session will timeout in 2 minutes.

How this can be done in classic asp?
I have a select that concatenates 3 fields and adds a space between the first name, middle name and last name.

The problem is if there is no middle name then 'fullname' ends up with two spaces between the first and last name. How can I avoid this?

This is my select statement:

CONCAT(ISNULL (a.FirstNm, ''), ' ', ISNULL (a.MiddleNm, ''), ' ', ISNULL (a.LastNm, ''))  AS fullname,  

Open in new window

The space should only be removed if there is no middle name, otherwise there should be space between first, middle and middle last.
Experts - My client has 2 websites (intranet). 1 is written in classic asp and the other in .Net.

.Net web application is 2 factor authentication enabled. The same has been set in web.config under App settings.

Now, the client wants to enable 2 factor authentication in Classic asp web application too. I understand its Old tech and should advise the client to go to .Net. However its a no go from client.

Can someone help get this done please?
1. How do i enable classic asp web application to be 2 factor authentication? (First at and then "PingID" as second Auth)
2. Currently it is connected to SQL server and "Connection.asp" has all the connection strings in it.

Please help.
Hi there.

I'm still working on a conversion of a MySQL based web database to MS SQL Server, and I have a little issue. In MySQL I could save NULL to a date variable, and it would show nothing in the web interface and back-end. But in MS SQL if I save a NULL (simply no value - NULL allowed) is still saves the date 01-01-1900. Is it possible to avoid that? If no date is saved, nothing should show up.
I use asp/VB.

Best regards


I am designing an online SQL database for ordering products on my web app.
I am trying to work out the best way to handle the "Basket".
The easiest way in my mind would be to retain the IDs of the items that
a user selects using cookies so that if the user leaves the page and comes
back I can use the cookies to show which items were selected.

An alternative option would be to have a SQL table that is structured
like my Products table. I would insert the user's selected items into this table.

I could also use my Orders table and show the Order status as being in the basket.

I'm looking for a little feedback on this. Thanks
LDAP Query : Table does not exist.
Hi all : thanks for taking the time to read my question.  I need some assistance with a strange LDAP issue.

ERROR: |80040e37|Table_does_not_exist.

We have ldap accessing code in the following format, Some times it's working,but is producing errors like above ERROR

Dim objRootDSE, objCon, objCmd, objRecordSet
Dim strDomainAdsPath
Dim arrMembers
Dim intCount
Dim strmember,strLoggedInUser, strUserStrId, strUserId,blnIsMemberOf, strDomPath,name
response.write strUser + "<BR/>"
Dim ServiceRequest
Dim MagicTicket

	Dim  strPassword, strQuery, oConn, cmd, oRS, Dom, mail,strUsername,firstname,lastname,fullname,URL,PathSAP

				Set objRootDSE = GetObject("LDAP://RootDSE")
				strDomainAdsPath = "LDAP://" & objRootDSE.Get("defaultNamingContext")
				response.write strDomainAdsPath + "<BR/>"
				Set objRootDSE = Nothing
				Set objCon = Server.CreateObject("ADODB.Connection")
				objCon.Provider = "ADsDSOObject"
				Set objCmd = Server.CreateObject("ADODB.Command")
				Set objCmd.ActiveConnection = objCon
				'objCmd.CommandText = "Select name,mail,UserPrincipalName from '" & strDomainAdsPath & "' where objectClass='user' and UserPrincipalName ='" & strUserfull & "'"

Open in new window

Keep up with what's happening at Experts Exchange!
LVL 12
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

I have a legacy site that I need to set up some emails using a pickup directory.  I have read that I need to use an include file like I do for the connection strings instead of a web.config.

The email code on my Classic ASP page is simple:
      Dim EmailDocument
      Dim strMessage
      Dim iConf
      Dim Flds
      Const cdoSendUsingPickup = 1
      strMessage = "My Message goes here"

      Set EmailDocument=CreateObject("CDO.Message")
      set iConf = CreateObject("CDO.Configuration")
      Set Flds = iConf.Fields
      With Flds
            .Item("") = cdoSendUsingPickup
            .Item("") = "path to my pickup directory"
      End With
      With EmailDocument
            Set .Configuration = iConf
            .From = "From Email Address"
            .Cc =strAddEmailAddress
            .Bcc = strAltEmailAddress
            .Subject = "Subject goes here"
            .TextBody = strMessage
      End With
        Set EmailDocument = Nothing
      Set strMessage = Nothing
      Set iConf = Nothing
      Set Flds = Nothing

I'm assuming I would add an include file like this:
<!--#include file="includes/Functions.asp" -->

What I don't know is the code I need to add to the actual include file.  The web.config would look like this:

                   <smtp deliveryMethod="SpecifiedPickupDirectory">
                    <specifiedPickupDirectory pickupDirectoryLocation="Path to my pickup directory" />
.net MVC  or  .net core?

We currently have a web application developed in ASP Classic.
The application is hosted in Microsoft Azure and we use Azure's SQL servers as well as the back-end.

We are still to decide if we move the application and use .net MVC or .net CORE?
I am not too familiar with the pros vs cons.  If there is a website with more information on comparing the two would be great.

I also understand CORE is newer and may not be as mature, do you consider this to be a significant problem?  Moving the system will take about 1 year.
we are using a Bootstrap 'template', AJAX, JSON, XML, etc.

Another thing to consider is that I downloaded Visual Studio in my mac. It would be great if I could check the code there and test the system in the mac computer.
I guess the challenge there will be to connect to our Development Database in Azure.

Any help, guidance, tips and especially comparison would be very useful. I know that sometimes its a matter of taste and seeing both sides of the argument would be very beneficial.
Hello, All;

So. This is a Shopping cart, and what we are doing is calculating ALL items per row, and then we need to add them together.
(Sample with two products with multiple(s) of each product
keeping in mind, that the shopping cart, just like any other, can have ONE or 100's of items in it.)

item cost: $16.99 (Amount)
Total of items: 15 (ProductTotal)
= $254.85

item cost: $3.99 (Amount)
Total of items: 6 (ProductTotal)
= $23.94

The MemID is the only thing that will be consistant.
The Item_No however, will change for each product the customer adds.

select sum(Amount)*sum(ProductTotal) as SubTotal from Cart where MemID='z6GQ9UPF55JeSlWDRbib' and Item_No='HL-00000116' --  $254.85
select sum(Amount)*sum(ProductTotal) as SubTotal from Cart where MemID='z6GQ9UPF55JeSlWDRbib' and Item_No='HL-00000005' --  $23.94

Open in new window

OK, what I would LIKE to accomplish, is to have all the items that are in the shopping cart, added together, in one SQL Statement.
Instead of doing it in ASP Classic afterward.

Any suggestions on this would be great.
This it the last part of the Shopping Cart, and it is completed.

Thanks in Advance.
Hello, All;

In my Shopping cart, I need to have a PLUS and MINUS Button.
When the user clicks on the Plus (or) Minus button, I need it to update the total. Instead of having to click a Submit button.
(the total will feed in from another page, example: 1.asp, where it will make a database call, update the field, for the quantity the customer has chosen.)

I found this code.
However, I am uncertain on how to make it work.
The author mentioned that using dynamically will work.

Any ideas would be wonderful.
Hi all, just moving my site to SmarterASP hosting and having some issues with the database line....

This is error

Microsoft JET Database Engine error '80004005'
'E:\core\activcore.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("core/activcore.mdb")

Open in new window

'E:\core\activcore.mdb' - is the old serverpath, how do i convert it to the new one.

Cheers in advance
I have a query in Classic ASP that has the potential to grow to thousands of rows.


' Our own constants:
Const PAGE_SIZE = 10  ' The size of our pages.

' Declare our variables... always good practice!
Dim strURL     ' The URL of this page so the form will work
               ' no matter what this file is named.

Dim cnnSearch  ' ADO connection
Dim rstSearch  ' ADO recordset
Dim strDBPath  ' path to our Access database (*.mdb) file

Dim strSQL     ' The SQL Query we build on the fly
Dim strSearch  ' The text being looked for

Dim iPageCurrent ' The page we're currently on
Dim iPageCount   ' Number of pages of records
Dim iRecordCount ' Count of the records returned
Dim I            ' Standard looping variable

' Retreive the URL of this page from Server Variables
strURL = Request.ServerVariables("URL")

' Retreive the term being searched for.  I'm doing it on
' the QS since that allows people to bookmark results.
' You could just as easily have used the form collection.
strSearch = Request("search")

' Retrieve page to show or default to the first
If Request.QueryString("page") = "" Then
	iPageCurrent = 1
	iPageCurrent = CInt(Request.QueryString("page"))
End If

If strSearch = "" Then

  'Display all the details passed

			'	for i=1 to request.form.count
			'	response.write Trim(request.form.key(i))&"; "& Trim(request.form.item(i)) &"<br>"
			'	Next

	Set cnnSearch = Server.CreateObject("ADODB.Connection")

	' This line is for the 

Open in new window







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.