Exchange 2010: MSExchangeTransport service not started

Today, my exchange setup just stopped working (I’m testing it, so it might have stopped a few days ago) I think it might be because of installation of patches on it.
Emails were stuck in the Transport Queue folder (I use EWS quite a lot, that’s where I found this info)

Anyway, I had those error messages while using Exchange troubleshooting:

An issue with the 'MSExchangeTransport' service on "ServerName" was found.
This service is required for local transport submission from the Mailbox server role on "ServerName and is currently not running or is experiencing backpressure.
When this service is not running or is experiencing backpressure, it may result in messages backing up in the outbox folder of each user's mailbox on "ServerName.
Please resolve these service issues and check whether messages can flow.
The value for the '\MSExchangeIS Mailbox\Messages Queued For Submission' counter on server "ServerName" is greater than zero (average value is 11) and it appears that 'MSExchangeMailSubmission' is failing to submit messages to at least one computer with the Hub Transport server role installed over the last minute.
'MSExchangeTransport' service on server "ServerName"1 is not running. It is important for this service to be running for the Mailbox server role on "ServerName" to submit messages to the Hub Transport server role on this computer.

Solution is just to start the Microsoft Exchange Transport service, you can find it here :

(in Server Manager>Configuration>Service)

DataBinding in C#: format a DateTime

Hi, today how to format a DateTime in a DataTable:

m_dtLogNotif is a DataTable
m_mfGridLogs is a DataGrid

BindingSource bsSource = new BindingSource();
m_mfGridLogs.BeginUpdate();
bsSource.DataSource = m_dtLogNotif;
m_mfGridLogs.DataSource = bsSource;
 
 DataGridViewCellStyle dgvcsStyle = m_mfGridLogs.Columns["Time"].DefaultCellStyle.Clone();
dgvcsStyle.Format = "dd/MM/yy HH:mm:ss";
m_mfGridLogs.Columns["Time"].DefaultCellStyle = dgvcsStyle;
 
m_mfGridLogs.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCells);
m_mfGridLogs.EndUpdate(true);

XML To Word (WordML) through XSLT

To translate.

Hey,

Today, a short post on how to use XSLT to create a Word document from a XML file

Process:

1. Create or open the model file with Word, then save it with the xml extension (2003)

2. Open it with a text editor (like notepad++ for instance)

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>

<?mso-application progid=”Word.Document”?>

Suivi d’une balise <w:wordDocument xmlns:aml=”ht….> (ici se trouve toutes les données du document) </w:wordDocument>

3. Modifiez la structure pour avoir au final:

<?xml version=”1.0″ encoding=”Windows-1252″?>

<xsl:stylesheet version=”2.0″

xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”

xmlns:msxsl=”urn:schemas-microsoft-com:xslt”

extension-element-prefixes=”msxsl”

xmlns:aml=”http://schemas.microsoft.com/aml/2001/core”

xmlns:dt=”uuid:C2F41010-65B3-11d1-A29F-00AA00C14882″

xmlns:ve=”http://schemas.openxmlformats.org/markup-compatibility/2006″

xmlns:o=”urn:schemas-microsoft-com:office:office”

xmlns:v=”urn:schemas-microsoft-com:vml”

xmlns:w10=”urn:schemas-microsoft-com:office:word”

xmlns:w=”http://schemas.microsoft.com/office/word/2003/wordml”

xmlns:wx=”http://schemas.microsoft.com/office/word/2003/auxHint”

xmlns:wsp=”http://schemas.microsoft.com/office/word/2003/wordml/sp2″

xmlns:sl=”http://schemas.microsoft.com/schemaLibrary/2003/core”

w:macrosPresent=”no” w:embeddedObjPresent=”no” w:ocxPresent=”no” xml:space=”preserve”>

<xsl:output method=”xml” indent=”no” version=”1.0″

encoding=”Windows-1252″ standalone=”yes”/>

<w:ignoreSubtree w:val=”http://schemas.microsoft.com/office/word/2003/wordml/sp2″/>

<xsl:template match=”/”>

<xsl:processing-instruction name=”mso-application”>

<xsl:text>progid=”Word.Document”</xsl:text>

</xsl:processing-instruction>

<w:wordDocument>

<o:DocumentProperties>

<!– gardez tout ce qui se trouve à l’interieur de Document Properties, de meme pour les blocs suivants: –>

</o:DocumentProperties>

<w:fonts>

</w:fonts>

<w:styles>

</w:styles>

<w:divs>

</w:divs>

<w:shapeDefaults>

</w:shapeDefaults>

<w:docPr>

</w:docPr>

<w:body> <!– ici se trouve le “vrai contenu”

</w:body>

</w:wordDocument>

</xsl:template>

</xsl:stylesheet>

Renommez en .xslt

Voila, vous avez désormais une feuille xslt qui doit vous donner l’exacte réplique de votre page word. Elle n’a rien de dynamique pour le moment mais vous avez la base! Le reste n’est qu’utilisation normale du “langage” xsl!

Pour ajouter un saut de page, la commande est : <w:br w:type=”page”/>

Bonne chance

Security Project II : Digital Signature (DSA)

The second assignment in the Stavanger University “Cryptography and Network Security” course was slightly harder, especially because during the generation of the key we have to play with huge numbers. I developed the application in Java and used the BigInteger class to handle these huge numbers.

The program works like that:

1. First, you have to generate your own public and private keys and you save the public key in a file (.pk extension)

2. Then, type your message and sign it, then save it in a file ( .mes extension)

3. The last step (the most important) is the part where you check if the message loaded really comes from the official writter. So you have to load his public key, load the message and then press check.

Here is a screenshot of the application:

For information, I have implemented the digital signature algorithm with a 1024 bits long p and a 160 bits long q (for people who knows what the DSA algorithm is all about)

I use a hash function made by myself. You can find everything in the code at the end of this post.

And you can download the whole project (code + exec + report) here :  > Download <