Every morning we run a series of reports. When the report is finished, it redirects to the next report, and so on.
These reports are ran on classic asp, server 2008 web server, sql 2000 server.
Up until a month ago they were ran on an IE 6.0 session from Windows XP. We are however migrating the process to be ran on a Server 2012 r2 using IE 11.
Since day one of the switch, random emails in the report chain will send two emails instead of one. What is baffling is, according to the logs, the page is physically running twice. However, this simply can not be the case because if the page was running twice, then two separate redirects would happen, causing duplicate reports on every single report after, but it doesn't.
So, it sort of looks like this:
Report 1 runs like normal
Report 2 runs like normal
Report 3 sends two emails
Report 4 runs normal
It appears almost all reports in our list are affected, but only randomly.
I placed code in to see if the page itself is running code twice, and sure enough, timsestamps show the code being ran twice. But again, only one redirect is happening, so I am completely baffled.
Here is an example piece of code:
set rs = Server.CreateObject ("adodb.Recordset")
ssql = "sql statement"
rs.Open ssql, dbc, adOpenForwardOnly, adLockReadOnly
if not rs.eof then
Set obJMail = Server.CreateObject("CDO.Message")
Set objConfiguration = Server.CreateObject("CDO.Configuration")
Set strFields = objConfiguration.Fields
.Item(cdoSendUsingMethod) = 2
.Item(cdoSMTPServer) = "server"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPconnectiontimeout) = 10
Set obJMail.Configuration = objConfiguration
obJMail.From = "email@example.com"
obJMail.To = obJMail.To & "; firstname.lastname@example.org"
obJMail.Subject = "subject"
obJMail.HTMLBody = obJMail.HTMLBody & "body"
do until rs.EOF
obJMail.HTMLBody = obJMail.HTMLBody & looped body"
ssql = "INSERT INTO TempReportTimestamps (ReportName) VALUES ('"&Request.ServerVariables("SCRIPT_NAME")&"')"
set rs = nothing
ssql = "UPDATE MorningReports SET ReportRan = 1, LastReportDate = '"&now()&"' WHERE (ReportName = 'webpage')"
if request.querystring("ManualRun") = "Yes" then
Response.Redirect "next email in loop"
As you can see, if the page runs twice, it would redirect to the next page in the loop twice, but it doesn't.