The function is to read the next INI file information in the publishing directory
<object id= "agobjorasession" runat= "Server" progid= "oracleinprocserver.xorasession" scope= "APPLICATION" >
</OBJECT>
<script Language=vbscript runat=server>
Const const_fl_name = "\getattributecode.ini"
Const const_fl_forreading = 1
Const const_db_section = "[Db_connection]" Sub Application_OnStart
On Error Resume Next
Dim OBJFS
Dim objTS
Dim Strlinedata
Dim flgsection
Dim Strtempdata
Application ("Service") = ""
Application ("User") = ""
Strlinedata = ""
Strtempdata = ""
Flgsection = False
set OBJFS = Server.CreateObject ("Scripting.FileSystemObject")
set objts = Objfs.opentextfile (Server.MapPath (const_fl_name), const_fl_forreading,false)
if Err.Number < > 0 Then
err.clear
Set objts = Nothing
Set objfs = Nothing
Exit Sub
end If
While not Objts.atendofstream
Strlinedata = Objts.readline
If Trim (strlinedata) <> "" Then
If flgsection = True and Mid (strlinedata,1,1) = "[" And _
Mid (Strlinedata,len (Strlinedata), 1) = "]" Then
Objts.close
Set objTS = Nothing
Set OBJFS = Nothing
Exit Sub
End If
If Strlinedata = const_db_section Then
Flgsection = True
End If
If flgsection = True Then
If Mid (strlinedata,1,7) = "Service" Then
Strtempdata = Trim (Mid (Strlinedata,8,len (Strlinedata)-7))
If Mid (strtempdata,1,1) = "=" Then
Strtempdata = Trim (Mid (Strtempdata,2,len (Strtempdata)-1))
Application.Lock
Application ("Service") = Mid (Strtempdata,2,len (Strtempdata)-2)
Application.UnLock
End If
End If
If Mid (strlinedata,1,4) = "User" Then
Strtempdata = Trim (Mid (Strlinedata,5,len (Strlinedata)-4))
If Mid (strtempdata,1,1) = "=" Then
Strtempdata = Trim (Mid (Strtempdata,2,len (Strtempdata)-1))
Application.Lock
Application ("User") = Mid (Strtempdata,2,len (Strtempdata)-2)
Application.UnLock
End If
End If
End If
End If
Wend
Objts.close
Set objTS = Nothing
Set OBJFS = Nothing
End Sub
</SCRIPT>