Ben Griswold on March 24th, 2010

Okay. This post isn’t about configuring SQL to allow remote connections, but wait, I still may be able to help you out. "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server [...]

Continue reading about Configure SQL Server to Allow Remote Connections

Ben Griswold on February 25th, 2009

I think everyone is familiar with those short urls which are being passed around in applications like Twitter.  It’s pretty neat that there are dozens of services willing to shorten urls for us, but what about lengthening them?  That’s where longurlplease.com comes in.  As they say, they promote safer and productive browsing by lengthening short [...]

Continue reading about Expand Urls with C# and LongUrlPlease

Ben Griswold on November 10th, 2008

I’m currently running Vista and I would like to manually complete the same operations as my Windows Service. Since the Windows Service is running under the Local System Account, I would like to emulate this same behavior. Basically, I would like to run CMD.EXE under the Local System Account.  (By the way, it’s fair to [...]

Continue reading about Run CMD.exe as Local System Account

Ben Griswold on July 9th, 2008

I am releasing/distributing a Windows application and service in a couple weeks.  Both application use the .NET 3.5 Framework and are wrapped up in a custom installer.  Rather than having my installer prompt the user to download the .NET 3.5 framework installer, I’m packaging it up with my setup program.  Very simply, I check to [...]

Continue reading about Using .NET 3.5 Client Profile (BETA)

Ben Griswold on July 1st, 2008

In the same vein as my last post on how to programmatically update a service startup type, here’s how one might determine if a service is currently stopped in C#: using System.Management; /// <summary> /// This routine checks if the provided service is stopped. /// </summary> /// <param name=”serviceName”>Name of the service to be checked</param> [...]

Continue reading about Check Status of Windows Service

Ben Griswold on July 1st, 2008

For the past six years I’ve been focused on web applications.  My current project, however, has me splitting time between the web and the desktop.  Today, I needed to programmatically toggle the Startup Type of my service between Manual and Automatic based on business conditions.   Here’s how I did it: /// <summary> /// This routine [...]

Continue reading about Update Service Startup Type