Navigation

Search

Categories

On this page

Get the current username and domain for the currently authenticated SQL Server user for Windows Integrated Authentication
Memories from MSDN Unleashed: The Best of PDC event
MSBuild fail on specific days

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 120
This Year: 1
This Month: 0
This Week: 0
Comments: 40

Sign In
Pick a theme:

# Monday, September 28, 2009
Monday, September 28, 2009 1:58:31 PM (Mountain Daylight Time, UTC-06:00) ( )

The title of this post declares the intent of the code below

DECLARE @Domain VARCHAR(50);
DECLARE @Account VARCHAR(50);
SET @Domain = SUBSTRING(SYSTEM_USER, 0, CHARINDEX('\', SYSTEM_USER));
SET @Account = SUBSTRING(SYSTEM_USER, CHARINDEX('\', SYSTEM_USER) + 1, LEN(SYSTEM_USER) - CHARINDEX('\', SYSTEM_USER));
SELECT @Domain + '\' +@Account AS samAccountName;

Comments [0] | | # 
# Wednesday, January 28, 2009
Wednesday, January 28, 2009 9:42:35 AM (Mountain Standard Time, UTC-07:00) ( All things Microsoft )
I went to the MSDN Unleashed: The Best of PDC event at ConfigureSoft. David Yack and Rob Bagby were presenting on the topics originally presented at PDC
  • What to expect with C# 4.0
    • It's really just the distilled content that has been available since October. You could hear it straight from Anders himself. Dave did an awesome job though.
  • The Silverlight Control Toolkit
    • Microsoft is releasing code out of band for Silverlight for those who wish to live on the edge
  • REST with WCF and the WCF REST Starter Kit
    • Creating a REST-ful web service is dead simple using WCF. Add to it the starter kit and you get all sorts of free goodies out of the box to making even more dead simple. Once again, "It Just Works"
  • Overview of Windows Azure (“The Cloud OS”) and Azure Services
    • Azure = a cloud operating system + a set of developer services. Somethings you just gotta have a platform to write scalable apps on without worrying about the infrastructure.
We got some awesome "Rest in WCF" t-shirts with a photo of Rob's dog on it. I'm going to have to hang it on the wall so everyone will ask why I have a sleeping dog on a shirt. It's all because of Representational State Transfer of course!

Rob had some very funny lines I will quote often in the future as well.

Like the guy on the Ginsu knife commercial says, But that's not all you get
...that's a potentially marriage limiting maneuver...
Thanks for the great presentation gentlemen. Thanks to Microsoft for continuing these events. They're a great way to digest the information.
Comments [29] | | # 
# Wednesday, January 21, 2009
Wednesday, January 21, 2009 11:20:59 AM (Mountain Standard Time, UTC-07:00) ( All things Microsoft )

I recently did a MSBuild script for a colleage to zip some files and move them to a file server and email them to two recipients.
The script should only run on a specific day (Sunday), and fail with an error if it is not that day.
Using the MSBuild Community Tasks Project from Tigris makes this a trivial exercise.

<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">

  <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>

  <Target Name="Build">
    <Time>
      <Output TaskParameter="DayOfWeek" PropertyName="DayOfWeek" />
    </Time>
    <Message Text="It's Monday!" Condition=" '$(DayOfWeek)'=='Monday' "/>
    <Message Text="It's Tuesday!" Condition=" '$(DayOfWeek)'=='Tuesday' "/>
    <Error Code="1" ContinueOnError="false" Condition="'$(DayOfWeek)'=='Monday'" Text="Stop everything, it's monday!"/>
    <Message Text="Everything is ok"/>
  </Target>
</Project>
Comments [0] | | #