Introduction
dotNetMSN(c) was a pretty simple to use library I found some time ago and it took me less than an hour to be familiar with it. I did many example integrations using dotnetmsn.dll on MSN(c) protocol connection and interaction with MSN protocol. But lately it seems the protocol changed in some way and some friends of mine using the library ask me why it is not working anymore.
I was about to check for the new version when I realized that there is no more project entry for dotNetMSN library; I found some other libraries for MSN protocol but this lightweight one captured my interest and I finally found in my backups the code to try fixing...
Background
As dotNetMSN is pretty old code, written by Mansour Behabadi (mansourbeh@yahoo.com) in 2004, the MSN version of the protocol used to write the tool was MSNP8. I'm sorry I did not have the time to check if the server ignores the MSNP8 request or simply violates it, but the issue was that the very first message, the VER
, changed a little bit. Right now the CRV0
last field of VER
response is not sent back anymore, so you simply need to fix this part of the code, to not wait/check this CVR0
.
Using the Code
On netMSN.vb line 207, you have the following code:
Case "VER"
If .Contains("MSNP8") And .Contains("CVR0") Then
p_connector.SendCommand(...
Simply remove the checking for the CVR0
and that's it, everything will be smooth and will be working as before...
Case "VER"
If .Contains("MSNP8") Then
p_connector.SendCommand(...
Compile the project and include the new DLL in your application code.
Points of Interest
It is of course a good exercise to use a network protocol analyzer to try to understand which part of the protocol changed and find that this minimal response makes your simple and perfect code stop working correctly. Re-engineering... nice idea, just need to put it in practice. :)
History
- 8th August, 2008: Initial post