Thanks for your suggestion.
I tried the library you told me about but still have the same problem. Any other suggestions?
Many thanks for your help.
you cant have the same problem with Arduino_Uno_WiFi_Dev_Ed_Library. because that library has a different api. try the examples of the Arduino_Uno_WiFi_Dev_Ed_Library.
did you connect your Uno WiFi to WiFi using the Web Panel as described in Getting started...?