With SQL server native client 11.0 and with only TLS 1.2 enabled, Classic asp application does not work when we try to append html fetched from database in the classic asp page

gracesoft
gracesoft used Ask the Experts™
on
Hello Experts,
                         We are attempting to disable TLS 1.0 and 1.1 in our servers. When we did that, our classic asp application did not work and we found that it is using SQL SERVER driver with SQLSRV32.DLL. It threw SSL Security error.
 
This is the actual connection string we use for Classic asp:
DRIVER={SQL Server};SERVER=XXXXXXXX;DATABASE=XXXXXXX;uid=XXXXXX; pwd=XXXXXXX
 
We changed the driver to the SQL SERVER NATIVE CLIENT 11.0. and it solved the problem. Everything else worked except for one page, the monthly calendar page. In the page, we generate the whole HTML for the page data in the database base table and append it directly on the .asp page using response.write.  The page does not throw any error, it simply does not load the data that we get from Database using a Stored Procedure.
 
When this did not work we used AJAX to get the html data. Even this did not work.
 
We tried saving HTML data in a variable which also did not happen.
 

We tried adding Response.ContentType = "text/html"
https://msdn.microsoft.com/en-us/library/ms524327(v=vs.90).aspx
 
we installed Microsoft® OLE DB Driver 18 for SQL Server with SQL Server Native Client 11 mentioned as Provider in the connection string. we got other errors.
 
 Is there any restriction with TLS older versions when we get the HTML directly and append it in a page?
 
 
----------------------------------------------------------------------------------------------------------------------------------------------------------------
 
More info:
 
Code Used in the calendar page:
dim conn
dim Constring
Constring = "DRIVER={SQL Server};SERVER=XXXXX;DATABASE=XXXX; uid=XXX; pwd=XXXXX"
set conn=server.createobject("ADODB.connection")
conn.open Constring
set CmdSP = Server.CreateObject("ADODB.Command")

CmdSP.ActiveConnection = conn
CmdSP.CommandText = "DynamicChartCell_Pmsui_New" '--call a sql stored procedure to get next id
CmdSP.CommandType = 4 '--adCmdSPStoredProc
CmdSP.Parameters.Append CmdSP.CreateParameter("@PropID", 3, 1, 2, propertyid)
CmdSP.Parameters.Append CmdSP.CreateParameter("@Room", 200, 1, 200, froomtype)
CmdSP.Parameters.Append CmdSP.CreateParameter("@SortMode", 200, 1, 200,"" & opt_SortMode)
CmdSP.Parameters.Append CmdSP.CreateParameter("@PageIndex", 3, 1, 2, 1)
CmdSP.Parameters.Append CmdSP.CreateParameter("@PageSize", 3, 1, 2, 42)
CmdSP.Parameters.Append CmdSP.CreateParameter("@ImagePath", 200, 1, 250, Session("imagepath"))
CmdSP.Parameters.Append CmdSP.CreateParameter("@ShareColor", 200, 1, 250, ShareClr)
CmdSP.Parameters.Append CmdSP.CreateParameter("@PageCount", 3, 2)

For Each param In CmdSP.Parameters
strTemp = strTemp & param.name &" = "&param.value & "<br>"
Next


CmdSP.Execute
PageCount = CmdSP.Parameters("@PageCount")

set adoRs = CmdSP.Execute

Do While Not adoRs.EOF
Response.Write adoRs("templates")              --------------->>> Code executes upto this point and we get empty value here.
adoRs.MoveNext
Loop
%>

-------------------------------------------------------------------------------------------------------------

The data in the table looks like this. It look like this

<tr class="Trcls" height=35 align=middle    =id><td onmousedown="return rclick(event)"  width="12%" align="left" id =1 class="TableLeftHeader"> &nbsp;&nbsp;<span onClick="displayRow('');"><A  id="trigger">Streak </a><div id="pop-up" class="pointRoom" style="display:none"><table><tr><td class="left-td"><b>Streak</b>, 9 Double Room SM<br>  roomtype </td><td class="right-td"><b> Amenities</b>:  <br><b>Regular Rate</b>: 400.00,: 20.00</td></tr></table></div></span></td> <a href = "javascript:OpenWindow('MODIFY','807','01','','');" style="text-decoration:none"> <td height="10" class="ChartCellCls borderRadius" colspan="1" name="807" onmousedown="return rclickcell(this,'0','d4879b','12/12/2018','7','807',  '','','Booked','1','000000000','No room',event,'0','', '210')"  style='cursor:hand;'  bgcolor="d4879b" ><a id="trigger" href = "javascript:OpenWindow('MODIFY','807','01','','');" style="text-decoration:none;color:black">Tok</a><div id="pop-up" style="display:none;z-index:1000"><h3 >Token One - 807</h3> <hr /> <table class="pointBooking"><tr><td class="guestPop"><h1>Guest Details</h1><b>Guest Email</b> : tokenone@gmail.com<br/><b>Phone No</b> : Home Phone 1<br/><b>No Of Guests</b> : 1</td><td class="bookingPop"><h1>Booking Details</h1> : 210<br/></td></tr><tr><td colspan="2" class="td3"><b>Notes</b> : </td></tr></table> </div></td><div id="#bigBadDiv" class="drop" ><a href = "javascript:OpenWindow('ADD','','','12/13/2018','7');" style='text-decoration:none'><td height = 10 class='ChartCellCls'  colspan='1' alt='null' onMouseOver="this.className='ChartCellOnCls'" bgcolor=''onmousedown = "return emptycellrclick(this,'12/13/2018','7',event);" ONMOUSEOUT = "this.className ='ChartCellCls' "  style ='cursor:hand;'> <a href = "javascript:OpenWindow('ADD','','','12/13/2018','7');" style='text-decoration:none;color:white'  ><div id="Streak, 12/13/2018|" class="drop" style="color:white" >Book Now</div></td></div>......................
 

Thanks,

Isaac
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Raja Jegan RSQL Server DBA & Architect, EE Solution Guide
Awarded 2009
Distinguished Expert 2018

Commented:
>> Everything else worked except for one page, the monthly calendar page

Anything specific on this page alone compared to the other pages..

>> The page does not throw any error, it simply does not load the data that we get from Database using a Stored Procedure.

Kindly double check whether the Stored procedure is returning the data properly or not..
Run profiler trace and see whether the procedure is executed with the correct set of parameters or not and with the valid credentials or login with access to database..
If not necessary privileges or parameters, then we need to fix it out else we can try executing the procedure from Query window once with the parameters passed(exec statement can be obtained from profiler trace) and see whether it returns the expected data or not
Hello Experts,
                        Thanks. We had to use a webservice in .net for this particular functionality and use it from the classic asp page.

Thanks,
Isaac

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial