473,387 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Dynamically finding the logfile folder

Hi,

I'm writing an ASP page that will analyze the logfiles and return
statistical information. I'd like to make this app so that I could drop it
into any of my webservers and get the logs for that server. Is there a way
to determine dynamically the location of the logfiles?

Regards,
Scott
Jul 19 '05 #1
5 1635
Scott,

The log files location is in the Registry:
--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Scott McNair" <sc**********@sfmco.takethispartout.com> wrote in message
news:Xn*******************@207.46.248.16...
Hi,

I'm writing an ASP page that will analyze the logfiles and return
statistical information. I'd like to make this app so that I could drop it into any of my webservers and get the logs for that server. Is there a way to determine dynamically the location of the logfiles?

Regards,
Scott

Jul 19 '05 #2
Must have clicked send button little too soon..

The log file location is in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\servic es\W3SVC\Parameters\LogFil
eDirectory

Since you can not access the registry with simple ASP page, you might have
to write a component that will do that for you. Or even have a Windows
Script that can do that, but then your ASP page has to run with enough
permissions to access the registry (such as the admin permissions).

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Scott McNair" <sc**********@sfmco.takethispartout.com> wrote in message
news:Xn*******************@207.46.248.16...
Hi,

I'm writing an ASP page that will analyze the logfiles and return
statistical information. I'd like to make this app so that I could drop it into any of my webservers and get the logs for that server. Is there a way to determine dynamically the location of the logfiles?

Regards,
Scott

Jul 19 '05 #3
"Manohar Kamath [MVP]" <mk*****@TAKETHISOUTkamath.com> wrote in
news:#v**************@TK2MSFTNGP09.phx.gbl:
The log file location is in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\servic es\W3SVC\Parameters
\LogFil eDirectory


Thank you, Manohar, for your quick response.

How would I find out the particular instance name? For example if I'm
running on W2K Server, and I've got W3SVC1, W3SVC2, and W3SVC3, and the
app is being run by W3SVC2, how would I find that out? I've found a
couple of server variables (APPL_MD_PATH and INSTANCE_META_PATH) that
contain it after a fashion (e.g. "/LM/W3SVC/1/ROOT") so I suppose if I
needed to, I could strip the instance name out of one of those, but is
that info stored in an easier to access location?

Thanks again for your help.

Regards,
Scott
Jul 19 '05 #4
Request.ServerVariables("INSTANCE_ID")

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Scott McNair" <sc**********@sfmco.takethispartout.com> wrote in message
news:Xn*******************@207.46.248.16...
"Manohar Kamath [MVP]" <mk*****@TAKETHISOUTkamath.com> wrote in
news:#v**************@TK2MSFTNGP09.phx.gbl:
The log file location is in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\servic es\W3SVC\Parameters
\LogFil eDirectory


Thank you, Manohar, for your quick response.

How would I find out the particular instance name? For example if I'm
running on W2K Server, and I've got W3SVC1, W3SVC2, and W3SVC3, and the
app is being run by W3SVC2, how would I find that out? I've found a
couple of server variables (APPL_MD_PATH and INSTANCE_META_PATH) that
contain it after a fashion (e.g. "/LM/W3SVC/1/ROOT") so I suppose if I
needed to, I could strip the instance name out of one of those, but is
that info stored in an easier to access location?

Thanks again for your help.

Regards,
Scott

Jul 19 '05 #5
"Mark Schupp" <ms*****@ielearning.com> wrote in news:ORly0PLoEHA.2024
@TK2MSFTNGP09.phx.gbl:
Request.ServerVariables("INSTANCE_ID")


Thanks, Mark.

Would all instances be name "W3SVC" & R.SV("INSTANCE_ID")? Or would there
be a situation where the instance would be named something other than
"W3SVC"?
Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: antishok | last post by:
Hi, I'm writing a page which has a somewhat similar folder tree to that of the windows explorer, where each folder is made of a <SPAN> tag consisting of the folder image (closed or open) and the...
6
by: Andy K | last post by:
Hi , I have an issue about logfile on db2 . My database (v7.2) is on linux ES 2.2 . The logretain is equal to recovery and userexit is off (for replication purpose that doesn't work...
8
by: Donald Xie | last post by:
Hi, I noticed an interesting effect when working with controls that are dynamically loaded. For instance, on a web form with a PlaceHolder control named ImageHolder, I dynamically add an image...
2
by: ge_orgy | last post by:
Accidently, I(we) deleted the Logfile.LDF in sysfiles folder on the mssql server and now can't enter the database, which status now is set SUSPECT. Before deleting the logfile I did a...
6
by: Dan Dorey | last post by:
I actually have two questions here, but I'll start by giving an outline of what I'm trying to do. I'm building an app with a simple plugin architecture (all in the same app domain). I have each...
0
by: NSF12345 | last post by:
Iv developed a small program that looks for a file over our network, and copy it to the location of another computer. Im using the "If FileExists("\\oldpc\main share\Folder\file.txt") Then" way of...
9
by: Suman | last post by:
Happy Friday everyone!!! I am working on a windows service and a C# application and needed some help with certain functionality. Please read through my issue below. Thanks! I have a windows...
6
by: roger.lagrilliere | last post by:
Hello, is anyone willing to help me out to setup a logfile. I have a program running in Access, but I want to know the progress of it. It is rather easy I think, but don't know how to handle...
5
by: tcwarrior | last post by:
Hi all. I am trying to write a little program where I extract some data out of a game in real time. The game writes some info to a log file, and I can access this in real time. The problem is that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.