473,811 Members | 3,241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1650
Scott,

The log files location is in the Registry:
--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Scott McNair" <sc**********@s fmco.takethispa rtout.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_MACH INE\SYSTEM\Curr entControlSet\s ervices\W3SVC\P arameters\LogFi l
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**********@s fmco.takethispa rtout.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*****@TAKETH ISOUTkamath.com > wrote in
news:#v******** ******@TK2MSFTN GP09.phx.gbl:
The log file location is in the registry:

HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\s ervices\W3SVC\P arameters
\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_P ATH) 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.ServerV ariables("INSTA NCE_ID")

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Scott McNair" <sc**********@s fmco.takethispa rtout.com> wrote in message
news:Xn******** ***********@207 .46.248.16...
"Manohar Kamath [MVP]" <mk*****@TAKETH ISOUTkamath.com > wrote in
news:#v******** ******@TK2MSFTN GP09.phx.gbl:
The log file location is in the registry:

HKEY_LOCAL_MACH INE\SYSTEM\Curr entControlSet\s ervices\W3SVC\P arameters
\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_P ATH) 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*****@ielear ning.com> wrote in news:ORly0PLoEH A.2024
@TK2MSFTNGP09.p hx.gbl:
Request.ServerV ariables("INSTA NCE_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
2226
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 folder name. When certain actions are performed by the user, more folders (spans) are dynamically added using javascript function appendChild(). I add a new folder span to a container span which holds the whole tree.
6
1603
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 anymore) . My end user want to keep the log (in case of ...) but want to move it
8
4318
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 button at runtime: //----- Code snippet protected System.Web.UI.WebControls.PlaceHolder ImageHolder; private void Page_Load(object sender, System.EventArgs e)
2
1834
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 Transaction-Logfile Backup and there is maybe an older version of full database backup somewhere. Trying to restore database with enterprise manager, restoring from the Transaction Logfile Backup, enterprise manager tells me: 'The preceding restore...
6
6879
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 plugin in a separate sub-dir inside a "Plugins" directory. Each plugin consists of at least two DLLs (a controller and a driver). However, most drivers also rely on other external DLLs. In one particular case this dependency is to a C++ DLL...
0
1909
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 finding if the file exists, but i want to make it so that it tries to look for the computer, not the file. At the moment this is how i am finding and copying the file: If FileExists("\\oldpc\main share\Folder\file.txt") Then FileCopy "\\oldpc\main...
9
8872
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 service which writes into a log file periodically (text file). I want to create a windows form application, which, upon invocation should continuously display the contents of the log file. Even the newly made entries into the log file while the...
6
6890
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 it. Basicly, I run macros and I just want to write a message to a file before and after the run of that macro. eg:
5
1782
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 the log name is (partially) new every time so I can't just open any file. Currently I have to first start the log, then copy the log name to my c ++ source file (fopen(logname)), then compile the source file and after that run the extracting...
0
9724
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10644
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10394
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10127
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7665
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5552
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4336
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.