Arduino wifiserver not connecting

Hello

I have an issue with the Arduino wifishield r3. I am trying connect to my Arduino wifishield using telnet. I am able to connect to my wifi but I am not able to connect to the wifi server. For some reason the server.available() command is not finding my telnet connection. Each time I telnet I get the error message:

Connecting to ipaddress …Could not open connection to the host, on port 23:Connection failed.

I am not sure why this happens. I have pasted my arduino code below.

#include <Stepper.h>
#include <SPI.h>
#include <WiFi.h>

Stepper motor(200, 8, 9, 10, 11);
WiFiServer server(23);
int conn = WL_IDLE_STATUS;

void setup() {
   Serial.begin(9600);
   while(conn != WL_CONNECTED){
     conn = WiFi.begin(........, .......);
     delay(10000);
   }
   server.begin();
   motor.setSpeed(60);
   Serial.println(WiFi.localIP());
   
}

void loop() {
  WiFiClient client = server.available();
  Serial.println(client);
  if(client){
    Serial.println("in if");
    motor.step(200);
    delay(500);
    server.write('m');
  }
}

Which Arduino are you using? If it is an Uno, you can't use D10 or D11. Those are connected to the SPI bus. The WiFi shield uses SPI.