The remote computer disconnected the session because of an error in the licensing protocol.

If you have followed a step by step guide for a bare installation of Windows Server 2008 Terminal Services role (TS Remote) or a similar how-to in our TechNet session in Makati last June 17 2008  on Deploying remote programs using Windows Server 2008 Terminal Services, we have not  configured the licensing role services of the Terminal Services server role. I have been receiving emails and inquiries (including our own internal infrastructure group) about installing TS Licensing and the error "The remote computer disconnected the session because of an error in the licensing protocol. Please try connecting to the remote computer again or contract your sever administrator".

 

 

Note: You must be logged on as or can run as a member of the machine administrators group and domain administrators group. For this example, I will assume that you have already logged on as an admin.

To install TS Licensing role services

Go to the Server Manager, expand Roles and the Terminal Services Role. Right click Terminal Services and click Add Role Services.

 

 

On the Add Role Services window, check the TS Licensing, then click Next >

 

 

On the configure Discovery Scope for TS Licensing, I choose "The domain" then  clicked Next >.

 

On the confirm installation Selections, click Install >

 

Takes about a few moments to install.

After the installation, we now need to configure the newly created role services.

To configure and to verify the install, go to Administrative tools, the expand Terminal Services and click TS Licensing Manager.

On the TS Licensing Manager Window, Expand the All Servers, then your Server Name, in this example I’m using the SANDBOX server.

Right click the server on the server list then click Activate Server.

 

On the welcome to the activate server wizard, click Next >


 

We need to activate our TS Server, I choose automatic connection just like activating your windows. Click Next >

Wizard now activates the Server thru Internet.

 

Install Licenses wizard options or selection depends on your Client Access Licenses, review your License program first if you are doing this on a production environment but for now for demo purposes, let us choose License pack (Retail Purchase). Click Next then Finish.

  

You may have to fill in two Info Forms.

 

We don’t need to install the Licenses now, clear the Start Install Licenses Wizard now check box, and then click Finish.

 

Continuing our installation. on the Server Manager, Expand the Roles to Terminal Serves and the Terminal Services Configuration.

As you can see in the screen shot, I have highlighted the Terminal Services Licensing mode link, and it is labeled Not yet configured. Double click to activate.

For this demo, I will be configuring Per User for the Terminal Services licensing mode. Since we have installed the licensing server on the same server as the terminal services server, we can specify the license server as localhost. Click Ok

 

then that’s it, we have already configured the Terminal Serves Licensing Server.

 

You may now use the Terminal Services Remote Applications.

Installing Hyper-V Server Role on a Standalone Server

 

I recently had to rebuild my Windows Server 2008 laptop, a Dual Core Athlon X64, 2 GB of RAM  with hardware virtualization capabilites. I usually use this for demo’s implementations and for personal practice as well.

Hyper-V gives me a virtual environment where I can have networked guest operating system interacting even on the physical host. I love snapshots, I have fat fingers and when ever I misconfigured a test guest I can just roll back to its previous state.

 

 

 

 

 

Adding Hyper-V Server Role

On the server manager, Click Roles.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Then Click Add Roles and the add roles wizard appears.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

On the add roles wizard, click next >

 

 

On the Select Server Roles window, Select Hyper-V then click Next >

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Introduction to Hyper-V. There are some useful info in here, most of the basics are covered in this window. I suggest that we skim over those info here and bookmark important links. For now, lets click Next >

Let us not choose any network for now, we can configure our networks later.

On the confirm installation window, this summarizes our installation configuration. I would also suggest that we skim this page for any changes before we actually install the Hyper-V server role.

 

Hyper-V is being installed at this moment, after the wizard completes there is a prompt that a restart is pending, click close.  

 

You must restart to finish installing.

 

After a restart, the server would have a windows update. Then after logging on again, the configuration resumes.

 

There! Installation succeeded! Click close and your Hyper-V Server Role is now installed and ready to be used!

 

Before we create our first virtual machine, lets our virtual networks. (saves me a lot of time in the long run)

Go to the Server Manger, go to Roles then expand Hyper-V and the Hyper-V Manager and right click the Server Name and chose Virtual Network Manager.

 

On the Virtual Network Manager, I will going to create an Internal virtual network. Click Add.

Name your new Virtual Network then click Apply and OK.

Lets now create our first virtual machine!

On Server Manager, Click Roles then expand the tree to Hyper-V, Hyper-V manager then to the name of the server.

 

 

 

Right click the server name then click New Virtual machine..

 

On the Before You Begin window, click Next >

 

I’m installing a new virtual instance of a Window Server 2008, and I will save this on a different location.

 

to change the location, click Browse and browse thru the local file system and select the directory where you want to save your VM’s. I usually create my own folder for the virtual hard disk and virtual machine configurations. After finishing this, click Next >

   

How much RAM would we give the new virtual machine? Is 512 enough for a Windows Server 2008?

 

Choose network. We have already configured our Internal Network and for my demo’s and practices, I’m going to use this.

We would also need to create a new virtual hard disk for our virtual machine. So we need to choose Create a virtual hard disk. Click Next > if finished.

 

We can also install an operating system on upon boot of the Virtual Machine. We can choose from different media’s and I have a Windows Server 2008 ISO, I’ll gona be using this. Just browse thru the file system and select the ISO.

After selecting the ISO, click Next >

We are now presented with a summary and if we are finished reviewing, we can click Finish to begin the creation process.

Note : Notice that the Start the virtual machine after it is created box was not checked. Quoting a good mentor on Hyper-V, never make it a habit to start a newly created VM right after creation, specially on a production environment and if you are converting Physical to Virtual Machines.

 

After creating the VM. We can now boot the new VM!

On Server Manager, Click Roles, Expand to Hyper-V and Microsoft Hyper-V Manager and select the server name.

The virtual machine list comes up, you can boot the Windows Server 2008 VM by right click and click Start.

 

This doesn’t immediately let you view the server that is running, you can view it by right click then click Connect. 

And the hyper-v connection window appears and you are now installing a new Windows Server 2008 running on top of a Hyper-V!

Installing Microsoft Loopback Adapter on Windows Server 2008

Installing the loopback is really easy. Just go to the control panel and Open Add Hardware.

Wizard appears and you may click Next >.

On the selection on "What do you want the wizard to do?" Select Install the hardware that I manually select from a list (Advanced) then click Next >

On the list, scroll down to and select the Network Adapters then click Next >

Scroll down the Manufacturer list and select Microsoft then on the network adapter list, select Microsoft Loopback Adapter and click Next >

The wizard will now confirm to install the virtual hardware. Clicking Next > will start the installation process.

   

You can now click the Finish button.

While the control panel is open. its a good time to configure the new (virtual) network adapter. We can configure the new Network just like a physical network. Just go to Network and Sharing Center on control panel

On the Network and Sharing Center, click Manage network connections.

Find the Network connection with labels as Microsoft Loopback Adapter, right click, then choose properties.

On my virtual network, I will be using IPv4 only for now. Choose Internet Protocol Version 4 (TCP/IPv4), then click properties.

I’m using a static network, and I will use the 10.0.0.0/ 24 block. Using this series, I dont want to conflict the existing physical network :D.

On the General Tab, choose use the following IP address radio button. I will be using the 10.0.0.2 IP, my subnet mask is 255.255.255.0 and a dummy gateway of 10.0.0.1. Ill be using it self as the DNS server (127.0.0.1). Click Ok. Then close the wizard.

  

Getting all available network interface using NetworkInterface namespace

By using the NetworkInformation namespace
you can get all of the available network interfaces on the current machine.
http://msdn.microsoft.com/en-us/library/system.net.networkinformation.aspx
This is very useful for  applications that are network aware 
or that require to configure the network adapters.
 
using System.Net.NetworkInformation;
 
   1:  //Iterate to all available network interfaces
   2:  foreach (NetworkInterface netInterface in NetworkInterface.GetAllNetworkInterfaces())
   3:  {
   4:      // Filter to load only configurable interfaces
   5:      if (netInterface.NetworkInterfaceType == NetworkInterfaceType.Ethernet |
   6:           netInterface.NetworkInterfaceType == NetworkInterfaceType.Wireless80211)
   7:      {
   8:         //Use the ff as strings, add to a collection or a list
   9:          netInterface.Name.ToString();
  10:          netInterface.Description.ToString();
  11:      }
  12:  }

The above snippet came from a little project that I wrote for me and my Amy that configures our wireless and cabled adapters. Because we both have laptops that connects to both of our office wireless, LAN on their conference (no wireless signal there), wireless in the condo, wireless at Bataan (ssshhh its free, but we need to configure your DNS to SMART BRO :P, it seems that their neighbor has DHCP but did not configured / or has hidden the DNS) 

Sending data to and receiving data from a resource identified by a URI thru WebClient

 

As I have posted on msforums.ph about using a System.Net.WebClient to "Post" a Collection instead of posting this string postData = "client_id=" + 318 + "&tracking_id=" + 2000 thru HttpWebRequest. You can use this:

 
   1:  //Declare your Name-value Collection
   2:  System.Collections.Specialized.NameValueCollection objCollectionToPost = new NameValueCollection(2);
   3:   
   4:  //populate your collection
   5:   objCollectionToPost.Add(“client_id”, 318);
   6:   objCollectionToPost.Add(“tracking_id”, 2000);
   7:   
   8:  //Instantiate  your System.Net.WebClient
   9:  WebClient objClient = new WebClient();
  10:  objClient.BaseAddress = “https:/payment.example.com/gateway”; 
  11:   
  12:  //To capture the response, you may use a byte[ array or a long string, your implementation
  13:  //would depend on what you think is the response will be
  14:  // for this instance I will use a byte array (you will notice why siguro at the end)
  15:   
  16:  Byte objResponseCollection;
  17:   
  18:  //This is the actual posting, you would notice that when you UploadValues to the 
  19:  objResponseCollection = objClient.UploadValues(objClient.BaseAddress, "POST", objCollectionToPost);
  20:   
  21:  //since most likely it would be a length of bytes, and I know from the documentation of your payment
  22:   
  23:  //gateway, that this will be a “Comma Delimited” string, I will process it as follows
  24:   
  25:  String objRetValues;
  26:  objRetValues = System.Text.Encoding.ASCII.GetString(objResponseCollection).Split(",".ToCharArray());
 
When you post WebClient usually returns the response of the payment gateway. 
The response is usually a long string that you need to split into a specified delimiter. 
In my example I already know that the gateway will return a "Comma Delimited" String based on the documentation I got from the payment provider.
 
For more info on WebClient go to msdn: http://msdn.microsoft.com/en-us/library/system.net.webclient(VS.80).aspx
 
 
 
 
 

MCPD – Web Developer

Its finally there! Its on the transcript! Yey!

Last October 29, I took the exam 70-547: http://www.microsoft.com/learning/en/us/exams/70-547.mspx and I got a passing score (phew!) Well that was really really hard!

 

My strategy for this exam is based on the preparation guide of the exam it self, so quoting Microsoft Learning:

Candidates should have worked in the following phases of the application life cycle:

  • Technical envisioning and planning
  • Design and development
  • Stabilizing and releasing

If you are taking this soon, I would suggest that you focus on these topics:

  • Exception handling
  • SQL and Data Topics
  • Authorization and Impersonation
  • The usual master page and theme questions
  • Validator controls
  • Testing and Deployment

 

Thanks also to my Boss 😛 for getting us this wonderful reference books from Microsoft Press! This book is still available at amazon.com.

Deploying Remote Programs using Window Server 2008 Terminal Services

Thank you for attending the Makati Technet Session:  Deploying Remote Programs Using Windows Server 2008 last July 24, 2008!

Final checking of slides (OC moments) while Mr. Elczar P. Adame is presenting a brief introduction to Microsoft Infrastructure Optimization 

   

   

Thanks again to all that attended and to Jeo, Elczar, Eugene and to the core members of PHIWUG for this event!

no {frills}

Thanks for attending the Philippine {heroes} community launch event last June 7, 2008 at Microsoft Philippines.

 

 

Here are some of the links that I have used on my presentation for this event:

Windows Server 2008 Management : http://www.microsoft.com/windowsserver2008/en/us/server-management.aspx

PowerShell FAQ: http://www.microsoft.com/windowsserver2008/en/us/powershell-faq.aspx

MSDN Powershell blog : http://blogs.msdn.com/powershell/

PowerShell Remoting Home on Codeplex : http://www.codeplex.com/powershellremoting

IIS administration thru PowerShell : http://blogs.iis.net/tobintitus/archive/2006/11/30/powershell-and-microsoft-web-administration.aspx

PowerShell For Fun for more sample scripts and How-Tos: http://mshforfun.blogspot.com/

Windows PowerShell 1.0 Installation Package for Windows Vista : http://www.microsoft.com/downloads/details.aspx?familyid=C6EF4735-C7DE-46A2-997A-EA58FDFCBA63&displaylang=en

 

Again, thanks for attending! I’ll see ya again on other events!

Genesis Release 2.5

By Michael L. Coleman

In The Beginning the Project Manager created the Programming Staff. The Programming Staff was without form and structure. And the Project Manager said, "Let there be Organization"; and there was Organization. And the Project Manager saw that Organization was good; and the Project Manager separated the workers from the supervisors, and he called the supervisors — "Management", and he called the workers — "Exempt".

And the Project Manager said, "Let there be a mission in the midst of the Organization, and let it separate the workers, one from another." And the Project Manager created the mission and he called it — "The System". And the Project Manager separated those who were to benefit from The System from those who were to build it. And he called the former — "Users", and he called the latter — "Programmers".

And the Project Manager said, "Let all the Programmers in the Organization be gathered together into one place, and let a Chief Programmer be brought to lead them." And it was so. And the Project Manager saw that he was competent.

And the Project Manager said unto the Chief Programmer, "Create for me a schedule, so that I may look upon the schedule and know the Due Date." And the Chief Programmer went among his staff and consulted with them. And the  staff was divided into two parts; one part was called — "Analysts", and the other part was called "Application Programmers". And the Analysts went back to their desks and estimated, as was their custom. And it came to pass that each Analyst brought his estimate to the Chief Programmer, whereupon he collected them, summarized them, and drew a PERT Chart.

And the Chief Programmer went unto the Project Manager and presented to him the estimate, saying, "It shall take ten months." And the Project Manager was not pleased and said, "I have brought you up from the depths of the staff; you have not grasped the ‘Big Picture’." And the Project Manager hired consultants, and authorized overtime, and he said to the Chief Programmer, "Behold, see all that I have done! The Due Date will be in five months." The Chief Programmer was much impressed and went from before the Project Manager and proceeded to implement The System.

And the Chief Programmer sent his Analysts to the users and said, "Let Specifications be written." And there were meetings, and luncheons, and telephone calls. And the Specifications were written. And there was a Payday and the Happy Hour, one month.

And the Chief Programmer examined the Specifications and saw that they were too ambitious. And he separated the mandatory features from the optional features; and he called the mandatory features — "Requirements", and he called the optional features — "Deferred", and the Users called him names. And the Chief Programmer gave the Specifications to the Analysts and said, "Let the Requirements be analyzed and let the Files be designed." And it was so. And the Chief Programmer said, "Let the Software Houses put forth their Salesmen, and let us have a Data Management System." And it was so. The Software Houses brought forth all manner of Salesmen who presented their packages, and claimed wondrous things for them, each according to his own file structure. And it came to pass that a Data Management System was selected; and the Chief Programmer saw that it was good. And there was a Payday and the Happy Hour, a second month.

And the Chief Programmer said, "Let the systems be divided into parts, and let each part be called a ‘Module’. And let programming teams be formed and let each be assigned to write a Module". And it was so. And the Chief Programmer created the programming teams with two levels, a greater and a lesser; and he called the greater the "Senior Programmers", and he called the lesser the "Junior Programmers". And he gave the greater dominion over the lesser. And the Chief Programmer saw it was good. And the Junior Programmers saw it differently. And there was a Payday and the Happy Hour, a third month.

And the Chief Programmer said, "Let the programming be started and let much overtime be consumed, for there is but two months left." And the Programmers, both the Senior and the Junior, were much afraid, and they strove to please the Chief Programmer. And they flowcharted, and they coded, each in his own fashion. And the Chief Programmer looked upon the work and liked it not. And the Chief Programmer said, "Let there be a Standard"; and there was a Standard. And the Programmers looked upon the Standard and liked it not. And there was a Payday and the Happy Hour, a forth month.

And the Chief Programmer said, "Let there be Progress Reports, so we can monitor and control"; and there were Progress Reports. And the Chief Programmer looked upon the Progress Reports and saw that the Due Date was not to be met. And the Chief Programmer arose, pressed his suit, shaved his beard, and went unto the Project Manager, and groveled. And the Chief Programmer pointed his fingers, and caused Blame to issue forth upon all manner of creatures who sold Hardware and Software. And the Chief Programmer asked for an Extension.

And the Project Manager was exceedingly angry, and cast doubts upon the Chief Programmer’s ancestry; and uttered a multitude of threats. But it came to pass that an Extension was granted; and the Chief Programmer took the Extension back to the programming teams, and there was much rejoicing. And the programming of the Modules was completed. And there was a Payday and the Happy Hour, a fifth month.

And the Chief Programmer said, "Let the Modules be integrated, one with another, so that System Testing may begin." And it was so. Two by two, the Modules were integrated, one with another. And great difficulties were experienced, and many hours of overtime were used, and many cups of coffee were consumed. And it came to pass that System Testing was completed. And there was a Payday and the Happy Hour, a sixth month.

Then the Chief Programmer did go to the Project Manager and said unto him, "Behold, I bring you good tidings, of a great joy which will come to all the Users; for on this day The System is completed." And suddenly there was with them a multitude of users praising the Chief Programmer and saying, "Glory be to The System in the highest, but can you make this one small change?"