Hi, I recently had also the problem with the Unable to connect error window, but the use_safe_connection was fine, already set to 0 in the first place. My first install was by Steam, but it kinda started to crash for no apparent reason, so then I downloaded the game from Taleworlds, put in the serial key from Steam, but then the error bull**** came up. The solution for my problem was to delete Warband registry in the regedit before reinstalling Warband, as the serial key was kinda messed up,written in a weird format (I'd bet I wrote it right lol).
I have absolutely no idea if this will help you, but giving it a try won't cost you anything