Showing posts with label SOA. Show all posts
Showing posts with label SOA. Show all posts

Tuesday, May 5, 2009

How to remove a Service

We are developing a application which is based on SOA. We are maintaing PowerShell scripts and batch files to Install/Uninstall and Start/Stop the services.
But in certain cases (especially when the Powershell script is updated and user doesn't run the previous script to uninstall service) the services still remains and doesn't get uninstalled.

For this there is a simple command.
1. Run Visual Studio Command Prompt (Run as administrator)
2. write the following code
sc delete <servicename>

Note : You can get the name of the service from the properties of the service

Wednesday, March 25, 2009

Load Testing of SOA - Services

I've been searching for a method by which I can perform Load testing of the services of my application (SOA Based). I wrote few Unit tests which I used to run from the inbuilt Load Agent with VSTS 2008 and get the results.

I was searching for another way by which I can get the counters from the services itself. I figured out how that can be done.

In the app.config of the service we want to host, we can write the following



<configuration>
<system.serviceModel>
<diagnostics performanceCounters="All" />
</system.serviceModel>
<\configuration>


This exposes all the performance counters from the service. There is a good article of this in MSDN

http://msdn.microsoft.com/en-us/library/ms735098.aspx

The counters can be viewed in the performance monitor of the machine hosting the service.
For opening this write perfmon.exe in Run

Create a new Log Setting for the required counters. And start the log setting before you perform the Load Test. You have to give a path to the output of the log as per requirement. I did with .blg file and it gives a pretty slick graphical representation of the data for all the counters selected in the profile.