How do I access a value from machine.config in classic asp?

106 views Asked by At

How do I access a value from machine.config in classic asp? I can't find the answer anywhere.... I don't even know how to begin to try to find a solution....

1

There are 1 answers

0
sumpen On

Use TextStream object.

Example:

<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")

Set f=fs.OpenTextFile(Server.MapPath("testread.txt"), 1)
Response.Write(f.ReadAll)
f.Close

Set f=Nothing
Set fs=Nothing
%>

https://www.w3schools.com/asp/asp_ref_textstream.asp