Archive for the ‘HowTo’ Category

Determining Users in an Active Directory Group and Active Directory Groups for a User

May 12, 2011

ONE: Determining Users in an Active Directory Group

C:>NET group GROUPNAME /domain

Here is an example for the users in the MSDN group: 

C:>NET group MSDN /domain


TWO:  Active Directory Groups for a User

To determine what a groups a user has in AD the command is:

C:/>NET user UserName /domain


Using SharePoint 2010 with InfoPath 2010 Forms as a Mash Up Video

May 2, 2011

Channel 9 has a great video presentation for using InfoPath Forms in the SharePoint 2010

He has about 8 demo’s that he displays and is a very good How-To use the InfoPath 2010 forms web part in the SharePoint.


The Three Main Demos are

  1. (09:23 mins) Customer/Order Master Detail is on set of Demo’s – use InfoPath Forms and SharePoint List using Web Part connections to send data across
  2. (27:00 mins) Help Desk is another set of Demo’s – use InfoPath Forms and SharePoint List using Web Part connections to send data across
  3. (34:27 mins) Shows how to drive calculations in an Excel Workbook using an InfoPath Form and a Mash Up page.  Using a Loan Calculator in Excel. Go to Office Online and download the Loan Calculator
  4. (44:45 mins) Shows how to track Donations for a Microsoft “Giving Campaign”.   This uses a Silverlight thermometer and as it fills up with mercury as donations are given.  The Chart is showing how much each division is giving.  The Give Now button on the InfoPath form collects name, employee number, business group, Donation amount.  A workflow is used to update the chart by division.
  5. (50:00 mins) Shows an Insurance Claims List for all the damage in an area hit by a storm. Mashed four web parts on the page, Customer Claim web part, All claims list, image view, Bing map web part.
  6. (57:00) Summary

WPF ToolTips

February 25, 2011

Code Snippet
  1. <Button Content="Submit"> <Button.ToolTip> <ToolTip> <StackPanel> <TextBlock FontWeight="Bold">Submit Request</TextBlock> <TextBlock>Submits the request to the server.</TextBlock> </StackPanel> </ToolTip> </Button.ToolTip> </Button>

Creating a ToolTip for a Button

Code Snippet
  1. <Button Content="Submit"> <Button.ToolTip> <ToolTip> <StackPanel> <TextBlock FontWeight="Bold">Submit Request</TextBlock> <TextBlock>Submits the request to the server.</TextBlock> </StackPanel> </ToolTip> </Button.ToolTip> </Button>

Code Snippet
  1. <Button IsEnabled="False" ToolTip="Saves the current document" ToolTipService.ShowOnDisabled="True" Content="Save"> </Button>

How to show ToolTips on Disabled Controls

Code Snippet
  1. <Button IsEnabled="False" ToolTip="Saves the current document" ToolTipService.ShowOnDisabled="True" Content="Save"> </Button>


How to Change the Show Duration of a ToolTip

Code Snippet
  1. <Button ToolTip="Saves the current document" ToolTipService.ShowDuration="20" Content="Save"> </Button>

How to Setup Logging using Enterprise Library in .NET

February 25, 2011


Here is the lines of code you put into the app.config file for the Services and GUI to get logging working using Enterprise Library.  This code is using the Enterprise Library 4.0

I used this in NADP, FBSubmit, and FBEdTrack



Code Snippet
  1.  <loggingConfiguration name="Logging Application Block" tracingEnabled="true"
  2. defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
  3.      <listeners>
  4.          <add fileName="c:\logs\FBSubmit\trace.log" header="—————————————-"
  5.   footer="—————————————-" formatter=""
  6.   listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  7.   traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  8.   name="FlatFile TraceListener" />
  9.          <add fileName="c:\logs\FBSubmit\trace.log" footer="—————————————-"
  10.   formatter="" header="—————————————-"
  11.   rollFileExistsBehavior="Overwrite" rollInterval="None" rollSizeKB="0"
  12.   timeStampPattern="yyyy-MM-dd" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  13.   traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  14.   name="Rolling Flat File Trace Listener" />
  15.      </listeners>
  16.      <formatters>
  17.          <add template="Timestamp: {timestamp} Message: {message} Category: {category} Priority: {priority} EventId: {eventid} Severity: {severity} Title:{title} Machine: {machine} Extended Properties: {dictionary({key} – {value} )}"
  18.   type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  19.   name="Text Formatter" />
  20.      </formatters>
  21.      <categorySources>
  22.          <add switchValue="All" name="General" />
  23.      </categorySources>
  24.      <specialSources>
  25.          <allEvents switchValue="All" name="All Events">
  26.              <listeners>
  27.                  <add name="FlatFile TraceListener" />
  28.                  <add name="Rolling Flat File Trace Listener" />
  29.              </listeners>
  30.          </allEvents>
  31.          <notProcessed switchValue="All" name="Unprocessed Category" />
  32.          <errors switchValue="All" name="Logging Errors &amp; Warnings" />
  33.      </specialSources>
  34.  </loggingConfiguration>

ASP.NET Interview with Scott Guthrie

December 22, 2010

Scott Guthrie: The Man Who Created ASP.NET

A Bytes by MSDN interview with ASP.NET creator Scott Guthrie who talks about what’s new in Silverlight 4. Click on video to learn about it on Dr. Dobb’s Microsoft Resource Center.

Signing Up as a Developer for Windows Phone 7 Instructions

December 10, 2010

Go to App Hub:

Sign in with your Windows Live account

Go to the Home/Membership drop down and you will get to the Membership screen

Select the Box on the page that says “Join Now” Membership Registration

Then you will be on the Account Creation Screen.  This is the fist step of 4 steps.

The 4 steps are listed below:

Step 1 Choose Account:  You will be asked if you are an Individual, Company, or Student

Step 2 Account Details

Step 3 Payment:  $99/year. 

NOTE:  There is a special till December 31st that if you create 2 programs for the Market Place you get a $99 credit.

Step 4 Confirmation


That’s it. 

Good Luck

Steven K James, 1-800-The-Nerd, Inc.

1-800-The-Nerd (800-843-6373)

Installing Microsoft Enterprise Library 5.0 msi file

December 2, 2010


The msi package is downloaded from

I renamed it from Enterprise Library 5.0.msi to Enterprise Library 5.0 April 2010.msi


Then run the msi package:

Example: S:\public\VB.NET Standards and Help\Enterprise Library\Enterprise Library 5.0 April 2010.msi

Answer default yes to all questions. 

It will install on the following local drive (c:):

  • C:\Program Files\Microsoft Enterprise Library 5.0



Go to the Microsoft Patterns and Practice Home Page:

See the “Design with Data” Video found on:

An article to read regarding with “Designing with Data”

A Practical Guide to Designing with data. A book by Brian Suda, published by Five Simple Steps

Never In Doubt by Ward Bell : Never In Doubt a blog that states:

Often wrong but never in doubt … an opinionated romp through .NET

Adding Microsoft Advertising to Windows Phone 7 using pubCenter

November 25, 2010

When you sign up, you will be able to get paid by check or EFT and see your stats in graphic form at pubCenter.

Wow! Adding Microsoft Advertising to Windows Phone 7 (WP7) could not be any easier.  The instructions are below.

Note:  Signup at this time is closed.  But, it promises to reopen soon.  This is because they want to work the “kinks” out of the system. 

Go to the website called the Microsoft Advertising pubCenter

  1. Login with your Microsoft Live Account
  2. When you login in you register your application and type of advertising.
  3. You then are instructed to get the dll needed.
  4. You add the dll to your application.
  5. Make a space for it in your app page
  6. Put into the properties of the advertising control the app id and advertising id
  7. That is all there is to it

To see a short video explaining this go to t 

Microsoft Advertising pubCenter SDK for Windows Phone 7