Did you happen to format the CF card in a different camera (or computer) and then try to use it int the 50D? It could be that simple. Always format with the camera you intend to use, nothing else.
Another thing you might try is clean the contacts on the lens and camera with denatured alcohol. Are you using a real Canon lens?