• #  Wednesday, January 13, 2010

Free tech focused series from Wintellect

The consulting company Wintellect  known in relation with world class experts like Jeff Prosise, Jeffrey Richter and John Robins are providing tech series that looks very promising. From the short description on http://www.wintellect.com/TechFocusSilverlight/ looks interesting.


  • #  Wednesday, January 06, 2010

Windows 7 God mode

 

image
Windows 7 so called “God mode” exposes many (if not all) Windows settings in single folder.

It is very easy to enter in such mode: just create a folder named "GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}" and enjoy.
image


  • #  Sunday, December 13, 2009

Rich PowerShell resource compilation

BenP created a nice compilation of PowerShell resources that can be very useful. It is so good that I am reposting here so I won’t lose it and know where to look when I need it :)

 

Microsoft Windows PowerShell Links
Scripting with Windows PowerShell Homepage
Windows PowerShell Owner’s Manual
Windows PowerShell Cmdlets
VBScript To Windows PowerShell Conversion Guide
Windows PowerShell Getting Started Guide
Windows PowerShell About Help Topics
Windows PowerShell Cmdlet Help Topics
Windows PowerShell Provider Help Topics
Windows PowerShell ISE Help
Windows PowerShell 2.0 Glossary
Windows PowerShell Quick Reference
Computer Performance
WMI Win32 Reference
PowerShell Cheat Sheet

Blogs
Hey Scripting Guy
Windows PowerShell  Blog
Richard Macdonald Blog
The PowerShell Guy
Richard Siddaway Blog
BenP Blog
Active Directory
WMI Blog

Script Libraries
Windows PowerShell Script Repository
Codeplex
PowerShell.com
PowerShellCommunity.Org
poshcode.org

Modules and Tools
PowerGui
Hyper-V Library
AD Cheat Sheet

Webcasts
One Cmdlet, Two Cmdlet, Three Cmdlet, Four: An Introduction to Windows PowerShell Commands (Level 200)
Object, Objects Everywhere: Working with Objects in Windows PowerShell (Level 200)
New Kid on the Scriptblock: Writing Scripts with Windows PowerShell (Level 200)
Amazing but True: Things You Never Dreamed You Could Do with Windows PowerShell (Level 200)
Managing  Large Infrastructures with Windows PowerShell 2
Windows, PowerShell and WMI, Unveiling Microsoft’s Best Kept Secret

Books
Windows PowerShell in Action
Windows PowerShell CookBook
Windows PowerShell  Step By Step
Windows PowerShell 2.0 Administrator's Pocket Consultant

Windows 7 Taskbar Thumbnail Buttons with WPF 4

I’ve just found a nice and *very* detailed article how to work with Windows 7 taskbar buttons similar to Windows Media Player and Zune app.

image

Check out Pete Brown’s blog post “Working with Windows 7 Taskbar Thumbnail Buttons with WPF 4


  • #  Saturday, November 21, 2009

Silverlight 4 Beta is here

At annual professional developer conference (PDC) in LA, CA was unveiled a Beta version Silverlight 4. After v3 added many new features and control v4 doesn’t change the pace and releases many new features.

Not only the new version produces 200% faster apps than v3 but continue to invest in Out-of-browser support which will be game changer in the way desktop applications are built. Now trusted applications has access to MyDocuments, MyMusic, MyPictures and MyVideos folder (or equivalent for non-windows platforms) but also has access to external programs as word processor or e-mail client as well as COM components.

Thus the programming mantra – “write/compile once and run everywhere” is getting close to the reality.

via http://www.silverlight.net/getstarted/silverlight-4-beta/


  • #  Tuesday, November 10, 2009

Microsoft SDK for Facebook

 

facebook%201_thumb[1] Today Microsoft put live latest release of the Facebook .NET SDK  that supports the newest Facebook services delivered through the Facebook Open Stream API and can be used in any of your favorite Microsoft development platforms; Silverlight, WPF, ASP.NET, ASP.NET MVC, and Windows Forms.

Get started today at www.microsoft.com/facebooksdk.


  • #  Tuesday, October 20, 2009

Visual Studio 2010 Beta 2 is here

vs2010logo[1] Microsoft Visual Studio 2010 Beta 2 is here with a new logo.
It can be downloaded from here .
 

There are many walkthroughs that can help you reveal new features in your favorite programming IDE

Visual Studio 2010 and .NET Framework 4 Beta 2 Walkthroughs

Enjoy!


  • #  Saturday, October 17, 2009

[TFS] How to: Move a shelve set to another branch?

Just found very useful command from TFS Power Toys: tfpt unshelve. It’s capable of migrating a shelveset from a branch to another, it does that by performing a baseless merge, so you will need to resolve the conflicts produced. The syntax of the command looks like the following:

   1: tfpt unshelve shelvsetName /migrate /source:$/SourceBranch /target:$/TargetBranch
 
(Reposted from here)

Hosting WCF service over net.tcp protocol in IIS7 (WAS)

There are several articles showing how to host non-http protocols on IIS7. Some steps are like black box while others could easily be misconfigured. 

The tasks is complicated additionally by obscured error messages returned in the browser :)

So let’s started (the example below is in Windows Server 2008. In Vista/Windows7 is similar but not exactly same):

Phase 1: Prepare server (prerequisites)

1. Add Web Server Role

  • Select following features as a minimum:
  • Common HTTP Features - all
  • Application Development
  • ASP.NET
  • .NET Extensibility
  • ISAPI extensions
  • ISAPI Filters
  • Security – all

2. Add Application Role

Add Application Server role and select all features (confirm all dependencies):

image

With this Phase 1 is complete. We should be able to navigate to Internet Information Services (IIS) Manage console in Administrative tools.

Phase 2: Deploying WCF application

1. Build WCF application with netTcpBinding :) (kindda obvious). For service endpoints leave address relative or empty.

   1: <services>
   2:   <service name="Microsoft.Test.Service" behaviorConfiguration="Service.ServiceBehavior">
   3:     <!-- Service Endpoints -->
   4:     <endpoint name="netTcp" address="" binding="netTcpBinding" bindingConfiguration="bigMessages" contract="Microsoft.Test.IService" />
   5:     <endpoint name="mexNetTcp" address="mex" binding="mexTcpBinding" contract="IMetadataExchange"/>
   6:   </service>
   7: </services>

2. Create website that will host it in IIS

Since it is not a challenge to create it via IIS Manager here is how it can be achieved via script (JS). This can be used as custom action in WiX/MSI as well

   1: var adminManager = new ActiveXObject('Microsoft.ApplicationHost.WritableAdminManager');
   2: adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST";
   3:  
   4: var sitesSection = adminManager.GetAdminSection("system.applicationHost/sites", "MACHINE/WEBROOT/APPHOST");
   5:  
   6: var sitesCollection = sitesSection.Collection;
   7:  
   8: var siteElement = sitesCollection.CreateNewElement("site");
   9: siteElement.Properties.Item("name").Value = "WcfNetTcp";
  10: siteElement.Properties.Item("id").Value = 7;
  11:  
  12: var bindingsCollection = siteElement.ChildElements.Item("bindings").Collection;
  13:  
  14: var bindingElement = bindingsCollection.CreateNewElement("binding");
  15: bindingElement.Properties.Item("protocol").Value = "http";
  16: bindingElement.Properties.Item("bindingInformation").Value = "*:80:";
  17: bindingsCollection.AddElement(bindingElement);
  18:  
  19: var siteCollection = siteElement.Collection;
  20:  
  21: var applicationElement = siteCollection.CreateNewElement("application");
  22: applicationElement.Properties.Item("path").Value = "D:\\Hosting\\WcfApp";
  23: applicationElement.Properties.Item("applicationPool").Value = "DefaultAppPool";
  24: siteCollection.AddElement(applicationElement);
  25:  
  26: sitesCollection.AddElement(siteElement);
  27:  
  28: adminManager.CommitChanges();
  29:  

3. Add net.tcp protocol:

Here is how it should look from GUI:

image

And the script for it

   1: var adminManager = new ActiveXObject('Microsoft.ApplicationHost.WritableAdminManager');
   2: adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST";
   3:  
   4: var sitesSection = adminManager.GetAdminSection("system.applicationHost/sites", "MACHINE/WEBROOT/APPHOST");
   5:  
   6: var sitesCollection = sitesSection.Collection;
   7:  
   8: var siteElementPos = FindElement(sitesCollection, "site", ["name", "WcfNetTcp"]);
   9: if (siteElementPos == -1) throw "Element not found!";
  10: var siteElement = sitesCollection.Item(siteElementPos);
  11:  
  12:  
  13: var bindingsCollection = siteElement.ChildElements.Item("bindings").Collection;
  14:  
  15: var bindingElement = bindingsCollection.CreateNewElement("binding");
  16: bindingElement.Properties.Item("protocol").Value = "net.tcp";
  17: bindingElement.Properties.Item("bindingInformation").Value = "809:*";
  18: bindingsCollection.AddElement(bindingElement);
  19:  
  20: adminManager.CommitChanges();

4. Enable net.tcp for website (Virtual Application) that hosts Wcf Service – in this example we’re hosting in the root of website

image

And of course the script:

   1: var adminManager = new ActiveXObject('Microsoft.ApplicationHost.WritableAdminManager');
   2: adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST";
   3:  
   4: var sitesSection = adminManager.GetAdminSection("system.applicationHost/sites", "MACHINE/WEBROOT/APPHOST");
   5:  
   6: var sitesCollection = sitesSection.Collection;
   7:  
   8: var siteElementPos = FindElement(sitesCollection, "site", ["name", "WcfNetTcp"]);
   9: if (siteElementPos == -1) throw "Element not found!";
  10: var siteElement = sitesCollection.Item(siteElementPos);
  11:  
  12: var siteCollection = siteElement.Collection;
  13:  
  14: var applicationElementPos = FindElement(siteCollection, "application", ["path", "/"]);
  15: if (applicationElementPos == -1) throw "Element not found!";
  16: var applicationElement = siteCollection.Item(applicationElementPos);
  17:  
  18: applicationElement.Properties.Item("enabledProtocols").Value = "http,net.tcp";
  19:  
  20: adminManager.CommitChanges();

Warning: Do not put any spaces in “Enabled Protocols” field. Although it might works for HTTP it doesn’t for net.tcp.

5. (Optional) Run in elevated mode (As Administrator):

   1: “%WINDIR%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" –i

I will cover why it is optional in next posts.

Note: Scripts are generated using IIS 7.5 IIS Management console and Windows 7

Hope that helps.

P.S. Here is the helper js function FindElement(). It is slightly modified from original generated by IIS Manager so it will compare values in case insensitive way.


  • #  Friday, October 16, 2009

Getting started with Silverlight

Tim Heuer posted a great series of articles targeted a new Silverlight developers. These can be used to ramp up with new things in v3 as well as Silverlight concepts.

Original post here.