Ubi's servers servers are still full of fail, so heres how to get around that problem. This only works on the 1.02 version, and so far there hasn't been one that works with newer versions.
1. Install the game.
2. Download and install the 1.02 patch:
Mirror 1: http://www.atomicgamer.com/files/85230/the-settlers-7-paths-to-a-kingdom-patch-1-02
3. Download the fix:
Mirror 1: http://www.megaupload.com/?d=NVY7HJ7I
Mirror 2: http://www.4shared.com/file/9bNLo25E/S7Fix.html
4. Go to the game's install directory (usually C:\Program Files\Ubisoft\The Settlers 7 - Paths to a Kingdom\). Copy over the "The Settlers7.exe" into the folder, and replace the file thats there already. Then follow the route of the data folder in the zip and copy the two dlls into the matching folder in the Settlers 7 directory (eg C:\Program Files\Ubisoft\The Settlers 7 - Paths to a Kingdom\Data\Base\_Dbg\Bin\Release) and replace the ones in there.
The game will not need to be online anymore.