W5200 Module

Digital pin 10 is the w5100/w5200 Slave Select on both Uno and Mega. Insure you have the SPI data lines connected correctly.