Query parameter example does not connect to WiFi, how to troubleshoot or fix?

I followed this example, and changed the ssid and password: ESP32 Arduino HTTP server: Getting query parameters - techtutorialsx

However, after it is uploaded to the ESP32, and the serial monitor is changed to 115200 baud, it just continually prints, "Connecting to WiFi.." without stopping to give any address. Is there something I'm doing wrong? How might this be fixed?

    #include "WiFi.h"
    #include "ESPAsyncWebServer.h"
    
    const char* ssid = "Wireless Controller";
    const char* password =  "12345678";
    
    AsyncWebServer server(80);
    
    void setup()
    {
      Serial.begin(115200);
    
      WiFi.begin(ssid, password);
    
      while (WiFi.status() != WL_CONNECTED)
      {
        delay(1000);
        Serial.println("Connecting to WiFi..");
      }
      Serial.println('\n');
      Serial.println(" \\/ ");
      Serial.println(" \\/ ");
      Serial.println(" \\/ ");
      Serial.println(WiFi.localIP());
      Serial.println("/\\");
      Serial.println("/\\");
      Serial.println("/\\");
      Serial.println('\n');
    
      server.on("/", HTTP_GET, [](AsyncWebServerRequest * request)
      {
    
        int paramsNr = request->params();
        Serial.println(paramsNr);
    
        for (int i = 0; i < paramsNr; i++)
        {
          AsyncWebParameter* p = request->getParam(i);
          Serial.print("Param name: ");
          Serial.println(p->name());
          Serial.print("Param value: ");
          Serial.println(p->value());
          Serial.println("------");
        }
    
        request->send(200, "text/plain", "message received");
      });
    
      server.begin();
    }
    
    void loop() {}

I also press the "EN" button. The same results.

Most probably the provided SSID and password don't match the configuration of your access point/router.

I thought I do not need a web server for an access point.

That sentence doesn't make sense in the current context.

In your first post you told us that the original intention was a web server.
If you don't have a WiFi network (aka no access point) you can have a web server on your ESP32 but you cannot use it because you need a network to send request to the server and get the responses back.

My ESP32 access point holds the web-server. It doesn't need any router since it itself provides the access point, accessed by any browser:

  WiFi.softAP(ssid, password);
  delay(500);
  WiFi.softAPConfig(IP, gateway, subnet);
  IPAddress IP = WiFi.softAPIP();
  Serial.print("AP IP address: ");
  Serial.println(IP);

Works now, thanks!

#include "WiFi.h"
#include "ESPAsyncWebServer.h"

const char* ssid = "Wireless Controller";
const char* password = "12345678";

AsyncWebServer server(80);

void notFound(AsyncWebServerRequest *request) {
    request->send(404, "text/plain", "Not found");
}
IPAddress IP(192, 168, 1, 1);
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 255, 0);

void setup()
{
  Serial.begin(115200);

  WiFi.softAP(ssid, password);
  delay(500);
  WiFi.softAPConfig(IP, gateway, subnet);
  IPAddress IP = WiFi.softAPIP();
  Serial.print("AP IP address: ");
  Serial.println(IP);

  server.on("/", HTTP_GET, [](AsyncWebServerRequest * request)
  {

    int paramsNr = request->params();
    Serial.println(paramsNr);

    for (int i = 0; i < paramsNr; i++)
    {
      AsyncWebParameter* p = request->getParam(i);
      Serial.print("Param name: ");
      Serial.println(p->name());
      Serial.print("Param value: ");
      Serial.println(p->value());
      Serial.println("------");
    }

    request->send(200, "text/plain", "message received");
  });

  server.begin();
}

void loop() {}