UR22 mkii MIDI problems

Hello! I’m trying to control an external hardware with MIDI but Ableton won’t recognise any MIDI port… I’m using the UR22mk2. I tried with another soundcard and it works… so the problem doesn’t come from the external hardware but from the soundcard… any help??