Five months after being convicted in federal court for trading child pornography online, an Army colonel is in military court this week for a series of online sexual escapades uncovered by his wife three years ago.

Col. Robert Rice, 58, faces up to 41 1/2 years in prison if convicted of all five counts in a court-martial that got underway Monday at Fort McNair, Washington, D.C.

Rice's wife first turned him in three years ago, after installing tracking software on their home computer because she was suspicious he was having an affair.

According to his federal indictment, Rice had confessed to his wife that he was addicted to pornography and had been visiting strip clubs near his post at the Army War College in Carlisle Barracks, Pennsylvania.

What she found included dozens of images of child pornography, messages in which he discussed exchanging pornography and how to hide it, as well as an explicit Craigslist posting looking for kinky sex from a man while his wife was out of town.

In May, a Pennsylvania federal court convicted him of possession, receipt and distribution of child pornography over a period from August 2010 to January 2013, according to a Justice Department release.

Now based at Joint Base Fort Myer-Henderson Hall, Virginia, Rice faces more than 40 years in a military prison, with adultery and conduct unbecoming an officer added to the child pornography charges, according to his Army charge sheet.

According to the charge sheet, Rice is accused of sending a picture of male genitalia and a suggestive message to a Craigslist user on Jan. 24, 2013, and using indecent language in a Yahoo messenger conversation two days later. The charge sheet also outlines three charges related to his prior conviction for swapping child pornography.