October 2003 - Posts

It may happen that you wish to connect to and control the behavior of a Windows Service - programatically. There's a .NET class called ServiceController just to do that. It represents a Windows service and allows you to connect to a running or stopped service, manipulate it, or get information about it. You will most likely use the ServiceController component in an administrative capacity. For example, you could create a Windows or Web application that sends custom commands to a service through the ServiceController instance. This would be useful, because the Service Control Manager (SCM) Microsoft Management Console snapin does not support custom commands.

Here's an example to check the status of the Telnet Windows Service and start/stop it as needed:

Dim sc As New ServiceController("Telnet")

 

If sc.Status.Equals(ServiceControllerStatus.Stopped) Or sc.Status.Equals(ServiceControllerStatus.StopPending) Then

sc.Start()

Else

sc.Stop()

End If

 

sc.Refresh()

The ServiceController class can also be used to manage services on another machine (by specifying the MachineName property). The ServiceController class requires the System.ServiceProcess namespace which you may need to add a reference to.

Posted by ashben | with no comments
Filed under:

Rory on PDC 2003: “Up until a couple days ago, I was a Large-Conference-Virgin. I have since been robbed of my innocence, and am now pregnant with thought ...

Got me thinking, maybe this  should have said “I want to get pregnant, but I can't :)

Posted by ashben | with no comments
Filed under:
John Lam (iunknown) has developed a small utility that will diff two different sets of assemblies and calculate the diff between .NET v1.1 and v1.2 of the Frameworks. Check it out here ...

The following two articles at MSDNAA are pretty interesting:

Use Design Patterns to Simplify the Relationship Between Menus and Form Elements in .NET - In Windows Forms applications, similar commands, such as those in a menu and their counterparts on a toolbar, are not automatically related. They don't fire the same event or run the same handler routine. Yet code that allows the same or similar user commands to fire the same code simplifies development. This article describes the principles of command management and why it's important to have functional commands that are not exclusive to any one UI element.

Performance Comparison: Exposing Existing Code as a Web Service - This article provides a performance comparison between three Web Service implementations that expose existing COM components and Transact SQL code and an equivalent Web Service implementation using ASP.NET.

More technical articles at MSDNAA ...

MSDN Operating Systems, Professional, Enterprise, and Universal subscribers can request a set of the software that will be distributed at the Microsoft Professional Developers Conference 2003 (PDC), including the preview versions of Longhorn, the Longhorn SDK, and Microsoft Visual Studio code-named "Whidbey."
Posted by ashben | with no comments
Werner Vogels has gathered some interesting notes on the backend architecture of some largely complex and distributed database-driven systems like those at eBay, Merrill Lynch, Swab, NASDAQ etc.
Posted by ashben | with no comments
Radio Interviews with .NET techies from PDC via SYS-CON Radio.

XAML != XUL ?!?!

Avalon Screen Saver Contest Info: Develop a screen saver using the new Avalon technologies in Microsoft Longhorn and you could win a Media Center edition or an XBox -- we'll choose the best three entries designed during Microsoft's Professional Developer Conference. Visit the PDC hands-on-labs to learn how to build your screen saver using Microsoft Longhorn and Avalon. Unfortunately, for PDC attendee's only.

Clemens Vasters has got the “PDC build” of Longhorn running on Virtual PC. If you plan to install a copy as well, which hopefully even the PDC absentee's will be able to when the alpha/beta version is released, don't forget to review his notes and tips on Longhorn installation. Andrej Budja writes about the Top 10 things to remember before installing Longhorn.

BTW, WinSuperSite has some Longhorn “Aero” screenshots on display.

Posted by ashben | with no comments
Business 2.0 (November 2003 Issue) features a nice article on The Best New Technologies of 2003. “Social Network Applications” is rated as the The Technology of the Year.
Posted by ashben | 1 comment(s)
Filed under:

The Longhorn Developer Center @ MSDN is live as expected. And so is the Longhorn SDK.

Scott Hanselman moblogs (cool term, for mobile/handheld blogging) from PDC - “They've brought out the folks from Adobe. They've got an image editing program (Adobe After Effects) that can export images/vectors/UI as XAML (eXtensible Application Markup Language) declarative UI directly! They imported the XAML file directly into VS.NET and get a form. Its a VERY dynamic, sexy UI with animations, charts, gradients ...”. Thanks Scott - for your amazing real time updates from PDC.

More Posts Next page »