Adding the status of a service to a label .NET
<p>I have added and installed a service and I'm trying to get the status of the service into a label e.g. "running".
I have added the following code </p>

<pre><code>public ServiceController sc = new ServiceController();
lblServices.Text = sc.Status.ToString();
</code></pre>

<p>However I'm getting the following run-time error:</p>

<p>"An unhandled exception of type 'System.ArgumentException' occurred in System.ServiceProcess.dll</p>

<p>Additional information: Service name  contains invalid characters, is empty, or is too long (max length = 80)."</p>