Communication from TwinCAT ads Webservice with a webpage not working.

Hello!
I am trying to create a communication between TwinCAT and a web page through ads. I tried to use the following examples but none of them is compatible with Visual Studio 2019, it needs a migration, which is done automatically by Visual Studio. Sadly, the migration doesn't execute correctly and the project fails to execute. I tried to solve the errors but still not working. Has someone an example or a tutorial of an ads Webservice communication compatible with VS 2019 that I may use as a starting point?

https://infosys.beckhoff.com/englis...tcadswebservice/html/webservice_intro.htm&id=
 
Update:

I tried to create a new TwinCAT XAE Project. On this project, I simply pasted the same variables as in the original project from the samples, to see if this will work. When I launch it, it has no error but still no data transfer to the webserver.
I looked at the console.log of the webpage and I found these errors.

Is the cause of the problem. If so, how can we solve it?

Access to XMLHttpRequest at 'http://localhost/TcAdsWebService/TcAdsWebService.dll' from origin 'http://127.0.0.1:5500' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
TcAdsWebService.js:376 POST http://localhost/TcAdsWebService/TcAdsWebService.dll net::ERR_FAILED
 
Top