A new release of Microsoft All-In-One Code Framework is available on Feb 6th. We expect that its 8 new code samples covering typical programming scenarios in Windows Azure, Directory Services, Hyper-V, TFS, WDK, and Windows SDK would ease your development work.
You can download the code samples using Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about sample updates.
If it is the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on Microsoft Showcase, or read the introduction on our homepage http://1code.codeplex.com/.
Configure SSL for specific page(s) while hosting the application in Windows Azure (CSAzureSSLForPage)
The sample was written by Narahari Dogiparthi – Escalation Engineer from Microsoft.
While hosting the applications in Windows Azure, developers are required to modify IIS settings to suit their application requirements. Many of these IIS settings can be modified only programmatically and developers are required to write code, startup tasks to achieve what they are looking for. One common thing customer does while hosting the applications on-premise is to mix the SSL content with non-SSL content. In Windows Azure, by default you can enable SSL for entire site. There is no provision to enable SSL only for few pages. Hence, Narahari has written sample that customers can use it without investing more time to achieve the task.
Change AppPool identity programmatically (CSAzureChangeAppPoolIdentity)
The sample was developed by Narahari Dogiparthi – Microsoft Escalation Engineer too.
Most of customers test their applications to connect to cloud entities like storage, SQL Azure, AppFabric services via compute emulator environment. If the customer's machine is behind proxy that does not allow traffic from non-authenticated users, their connections fail. One of the workaround is to change the application identity. This cannot be done manually for Azure scenario since the app pool is created by Windows Azure when it is actually running the service. Hence, Narahari has written sample customers can use to change the AppPool identity programmatically.
Write / add SPN to user or computer account in AD (CSDsWriteAccountSPN)
Developed by Shaleen Thapa – Microsoft Support Escalation Engineer, this sample application demonstrates how to write/add Service Principal Name (SPN) to any user or computer account object in Active Directory. This sample must be run on domain environment and under the Domain Admin privileges. You can execute this sample by creating the exe via Visual Studio but it must be running under the domain admin credentials. Also this code must be running either on Domain controller or any one of the member servers.
Get User Group Membership in AD (VBGetUserGroupInAD)
Developed by Shaleen Thapa – Microsoft Support Escalation Engineer, this sample application demonstrates how to perform a search on the user’s group membership in Active Directory. This demonstrates the recursive looping method. Also it shows how to get the Object SID for the group.
We are using System.DirectoryServices namespace to perform a search on AD. We will be passing the distinguishedName of the domain with the username whose membership we would like to fetch. Once we found the user, we will read the memberOF attribute’s value. It is one of the possibilities that the group can be member of another group as well; in this case we would need to do a recursive looping.
Clone Hyper-V VM Settings (CSHyperVCloneVM)
Developed by Jithesh Nair – Microsoft Support Escalation Engineer, this sample demonstrates how to create VM from an existing VM template without copying the VHD file.
The existing methods of cloning VMs include exporting/importing the VM configuration along with VHD. If the VHD size is larger this method of cloning takes too much of times. There are scenarios where the customers wanted to creates VMs programmatically from an existing template. This sample demonstrates how one can use WMI and C# for cloning VMs without copying VHD.
Add CheckOut Event to TFS (CSTFSAddCheckOutEventType)
Developed by Ruiz Yi – Sample Writer of Microsoft All-In-One Code Framework, the sample demonstrates how to enable checkout notification in TFS2010. In TFS2010, when a user sends a Check out (PendChanges) request to server, the server will send a PendChangesNotification before the items are checked out. If we subscribe this notification, we can do following things:
Virtual Volume Driver (WDKVirtualVolume)
Developed by Bart Bartel – Microsoft Senior Escalation Engineer, this is the Virtvol sample driver. This driver basically creates a nonpaged pool and exposes that as a storage media. User can find the device in the disk manager and format the media to use as FAT or NTFS volume.
List process type information for all running processes (CppCheckProcessType)
Developed by Amit Dey – Microsoft Software Development Engineer, this sample code lists process type information for all running processes. like:
If you have any feedback, please fill out this quick survey or email us: email@example.com
the codeplex is not updated with the Feb/12 release yet. Still shows Dec/11 as the latest version.