G
Guest
I need to programmatically access the IIS logfile path, so that my webservice
could create a new file in that directory and write to it....
I searched the net and could find a way to do it.....
Dim IISOBJ, Servername, WebSiteID
Dim flag2 As String
flag2 = ""
Servername = "localhost"
WebSiteID = 1
IISOBJ = GetObject("IIS://" & Servername & "/W3SVC/" & WebSiteID)
If (IISOBJ.LogType = 0) Then
flag2 = "Disabled"
Else
flag2 = "Enabled"
End If
flag2 = IISOBJ.LogFileDirectory
But the above code gives a "run-time exception thrown : System.Exception -
Cannot create ActiveX component." at GetObject("IIS://" & Servername &
"/W3SVC/" & WebSiteID)...
Any solution would be appreciated....
Also, if there are any other ways of doing this, it would be of great help
to me...
thanks!
could create a new file in that directory and write to it....
I searched the net and could find a way to do it.....
Dim IISOBJ, Servername, WebSiteID
Dim flag2 As String
flag2 = ""
Servername = "localhost"
WebSiteID = 1
IISOBJ = GetObject("IIS://" & Servername & "/W3SVC/" & WebSiteID)
If (IISOBJ.LogType = 0) Then
flag2 = "Disabled"
Else
flag2 = "Enabled"
End If
flag2 = IISOBJ.LogFileDirectory
But the above code gives a "run-time exception thrown : System.Exception -
Cannot create ActiveX component." at GetObject("IIS://" & Servername &
"/W3SVC/" & WebSiteID)...
Any solution would be appreciated....
Also, if there are any other ways of doing this, it would be of great help
to me...
thanks!