[Solved] Reading appsettings Error: Microsoft VBScript runtime error 800a01a8 in Classic ASP

Waghmare
 
on Sep 13, 2021 07:16 AM
554 Views

Hi Team,

I have referred below link.

https://stackoverflow.com/questions/28960446/having-classic-asp-read-in-a-key-from-appsettings-in-a-web-config-file

I am facing error Microsoft VBScript runtime error '800a01a8' at below line.

Set oChild = oNode.GetElementsByTagName("add")

However if i made Appsett.asp file and put a code in it, it is working fine.

If i referes the same file in diff file as #include then it throws an error.

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Sep 13, 2021 07:40 AM

Hi Waghmare,

You need to verify the oNode.

Does it returns value based on the sectionName?

Set oNode = oXML.GetElementsByTagName(sectionName).Item(0) 
Set oChild = oNode.GetElementsByTagName("add")

 

Waghmare
 
on Sep 13, 2021 08:37 AM

Thanks sir 😊.

There was a small change required for web.config path.

I have added ..\web.config and it works.something issue with path only that's why it is throwing an error.