Hi,
Remove the portal only option and create a enrollment code , refer the screenshot.
Portal only option should be NO.. Create new enrollment code and Test
The reason you are getting error because your enrollment code might content xnets://ip:3008 /SSP .. You can verify that by selecting enrollment code and click INSPECT button