If your Wii keeps throwing an error when you try to get online, a good first stop is wiisupport.com, which walks you through the setup step by step.
Following their guidance should help you track down what's going wrong and get connected.