Solved

XML document modification

Posted on 2008-06-23
4
153 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 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