November 28, 2009
Android SDK
Hope everyone had a nice day today. I downloaded the android SDK...looks very nice. Now just need to find that one app that everyone needs. Anyone have a wish-list?
November 27, 2009
November 26, 2009
November 25, 2009
MSMQ Count with C#
We had a bug in our production environment that filled up MSMQ and would be tied to a specific windows service that we had running. In order to fix this, the solution was to stop and start the windows service. The catch was that we only wanted to do this when the MessageQueue count was above a certain number. You can get access to the class here. A snippet of the main code is below:
public void Run()
{
if (TotalMessagesInAllQueues() >= MessagesCriticalCount)
{
StopService();
SendEmail();
StartService();
}
}
private ManagementObject GetServiceByName(string name)
{
Listlist = SearchObjects(string.Format("Select * From Win32_Service WHERE Name='{0}'", name));
if (list.Count == 0)
throw new Exception(string.Format("Service '{0}' can not be found", name));
return list[0];
}
private ulong TotalMessagesInAllQueues()
{
var list = SearchObjects("Select * From Win32_PerfRawData_MSMQ_MSMQService");
return (ulong)list[0].GetPropertyValue("TotalMessagesInAllQueues");
}
November 24, 2009
November 23, 2009
Testing in IE5 - IE7
I am a firefox/chrome guy..but you always need to test in IE. I had an issue with a .js file that worked in IE8 but failed in 5,6,7. I could have downloaded a virtual, but someone sent me this great tool...what a time-saver!
November 22, 2009
Administrator not needed to Run Remote PowerShell Commands
I always impersonated, but it is good to read this article.
Subscribe to:
Posts (Atom)