Cant connect to my arduino web server, server.available() seems to fail

Hello. I have problems connecting to the webserver on my arduino mega.

The arduino initialises fine and obtain an DHCP IP-address, typically it is When i try to connect to it, Google Chrome says that it cannot connect to I am able to ping the arduino and i get a good response. The problem seems to be that server.available() never becomes "true" and therfore my web-code doesn't run.

Here is the part of my code that i have problems with. I tried putting in som println's to se where my sketch fails. The "a" is printed every loop, but the "b" never apears, indicating that the sketch never enters the if(client) statement.

// listen for incoming clients

EthernetClient client = server.available();
  if (client){

    while (client.connected()){

        if(client.find("GET /")){ and so on...

If someone is able to help, i will be very gratefull!