Quantcast
Channel: Classic ASP
Viewing all articles
Browse latest Browse all 488

Unable to run working IIS 7 Classic ASP application on IIS 8

$
0
0

I am migrating a classic ASP application from IIS 7 to IIS 8 but am getting Object_required:_'Application(...) error when calling function in Global.asa.

On checking Global.asa , the problem is mitigated by hard coding the Server.MapPath generated path in the code when loading the XML. But i need a proper solution for this issue. What can cause this issue and how do i fix it?

Note : The IIS server roles in IIS 7 and IIS 8 are similar.

Given below is the failing excerpt from my global.asa file :


<SCRIPT LANGUAGE=VBScript RUNAT=Server>

....

    'Loads Test.xml
    call setXMLInApplicationScope ("Test.xml", "Test")

.....

Sub setXMLInApplicationScope(sFileName, objectName)
    Dim xmlDoc
    
    If Application("ApplicationError") = "Y" Then
        Exit Sub
    End If
    
    Set xmlDoc = createFreeThreadedDOM()
    Call xmlDoc.setProperty("SelectionLanguage", "XPath")    
    Call xmlDoc.load(Server.MapPath(sFileName))


Viewing all articles
Browse latest Browse all 488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>