Accessing IIS Logfile configuration properties

  • Thread starter IIS LogFile configuration properties....
  • Start date
I

IIS LogFile configuration properties....

I want my websvc to read the logfile directory path from IIS configuration
Properties, thereby store my websvc log messages in a file created in that
directory.
The reason is that the websvc has to be installed on several servers and I
donot want to hardcode the logfile path in the code. I get an error "Run-time
exception thrown : System.Exception - Cannot create ActiveX component."
" on GetObject Call, when I tried the following code.

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

I read about the metabase issues...but didnt know what to do....
Is this a security issue? If so, how do I work around it..Thanks a million
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top