Step 1: ASP ScriptCreate an aspx file with the same path on your IIS server as "/integration_demo/search/asp_xml.aspx" and place the following code:
<%
Dim objXML, objXSL, sTemplate
sTemplate = "http://demo.loopip.com/integration_demo/search/asp_xml.aspx"
If Request.QueryString("cached") <>"" Then
Dim strResult As String
Dim objResponse As System.Net.WebResponse
Dim objRequest As System.Net.WebRequest = System.Net.HttpWebRequest.Create(sTemplate & "?" & Request.ServerVariables("QUERY_STRING"))
objResponse = objRequest.GetResponse()
Using sr As New System.IO.StreamReader(objResponse.GetResponseStream())
strResult = sr.ReadToEnd()
sr.Close()
End Using
Response.Write(strResult)
Response.End()
End If
objXML = Server.CreateObject("MSXML2.DOMDocument")
objXML.async = False
objXML.setProperty("ServerHTTPRequest", True)
objXML.load(sTemplate & ".xml?hideheaders=1&" & Request.ServerVariables("QUERY_STRING"))
objXSL = Server.CreateObject("MSXML2.DOMDocument")
objXSL.async = False
objXSL.setProperty("ServerHTTPRequest", True)
objXSL.load(sTemplate & ".xsl")
Response.Write(objXML.transformNode(objXSL))
objXML = Nothing
%>
Make sure the sTemplate variable contains the URL to the template you wish to use.Step 2: Test ItNot all functionality will work without further changes to the XSLT template. You could supply an entirely new XSLT template rather than relying on the Net Research Server version. The XSLT template has already been modified to make all category URLs use a dynamic link, and use the "hideheaders" variable to skip rendering the header and sides.