Solved

XML document modification

Posted on 2008-06-23
4
152 Views
Last Modified: 2010-05-18
I am working on a new QA tool.When i run some services on the tool like restart service and shutdown service, an XML file is created at a location.When i was working on 1 such service, i restarted a service called ASP.net and the XML file looks like this:
  <?xml version="1.0" encoding="utf-8" ?>
- <XMLTestCollection>
- <ServiceMonitorList TServiceMonitors="ServiceMonitors">
- <ServiceMonitor name="HTTPFilter" scriptVersion="1.0.0">
  <ScreenName ScreenName="HTTP SSL" />
  <DisplayName DisplayName="HTTP SSL" />
  <ProcessName ProcessName="Idle" />
  <PriorityDisplay PriorityDisplay="True" />
  <PriorityLocation PriorityLocation="1" />
  </ServiceMonitor>
- <ServiceMonitor name="McTaskManager" scriptVersion="1.0.0">
  <ScreenName ScreenName="McAfee Task Manager" />
  <DisplayName DisplayName="McAfee Task Manager" />
  <ProcessName ProcessName="vstskmgr" />
  <PriorityDisplay PriorityDisplay="False" />
  <PriorityLocation PriorityLocation="0" />
  </ServiceMonitor>
- <ServiceMonitor name="Eventlog" scriptVersion="1.0.0">
  <ScreenName ScreenName="Event Log" />
  <DisplayName DisplayName="Event Log" />
  <ProcessName ProcessName="services" />
  <PriorityDisplay PriorityDisplay="True" />
  <PriorityLocation PriorityLocation="2" />
  </ServiceMonitor>
- <ServiceMonitor name="RpcSs" scriptVersion="1.0.0">
  <ScreenName ScreenName="Remote Procedure Call (RPC)" />
  <DisplayName DisplayName="Remote Procedure Call (RPC)" />
  <ProcessName ProcessName="svchost" />
  <PriorityDisplay PriorityDisplay="False" />
  <PriorityLocation PriorityLocation="0" />
  </ServiceMonitor>
- <ServiceMonitor name="aspnet_state" scriptVersion="1.0.0">
  <ScreenName ScreenName="ASP.NET State Service" />
  <DisplayName DisplayName="ASP.NET State Service" />
  <ProcessName ProcessName="Idle" />
  <PriorityDisplay PriorityDisplay="False" />
  <PriorityLocation PriorityLocation="0" />
  </ServiceMonitor>
- <ServiceMonitor name="Dnscache" scriptVersion="1.0.0">
  <ScreenName ScreenName="DNS Client" />
  <DisplayName DisplayName="DNS Client" />
  <ProcessName ProcessName="svchost" />
  <PriorityDisplay PriorityDisplay="True" />
  <PriorityLocation PriorityLocation="3" />
  </ServiceMonitor>
  </ServiceMonitorList>
  </XMLTestCollection>


Is there a way where i can modify or delete the contents of the XML file because i tried doing it from the location , but i am unable to modify or delete the ASP.NET State service.Please help me.
0
Comment
Question by:rishab2905
  • 2
  • 2
4 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 21853960
What is the filename of the XML file?
It looks like it could be the output of a service-monitoring service.  If so, it may remain open for long periods of time (making it impossible to delete).  In any case, it may be unwise to delete it.
0
 

Author Comment

by:rishab2905
ID: 21858633
ya, you are right.It is the output of a service-monitoring service.what can be done to close it.for example in tha above XML file, the "asp_net state " is not starting up and it is shown in the output as "Detected ASP.NEt service Stopped".What can be done to remove the above statement from the output document?Please clarify?
0
 

Accepted Solution

by:
rishab2905 earned 0 total points
ID: 21858657
the file name is ServiceMonitor.xml and the services listed in the above Xml document are the various kinds of services that are being monitored.
0
 
LVL 49

Assisted Solution

by:DanRollins
DanRollins earned 350 total points
ID: 21860841
I still don't understand why you would want to modify a log file (other than to hide some action that should not be hidden).  Please describe your reasons.

In any case, if the file is owned by a process that is protecting it from being modified, then probably the only way to modify it would be to stop that process.  Finds out which System Service is keeping the file open, and do a
    net stop <serviceName>
and the file can then be deleted.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now