simatic-s7-webserver-api icon indicating copy to clipboard operation
simatic-s7-webserver-api copied to clipboard

.netcore support

Open KircMax opened this issue 3 years ago • 5 comments

Having tried the RequestHandler in a .netcore app has shown that the requests haven't been sent (and responses received) as expected - we currently don't know why this is an issue.

KircMax avatar Nov 05 '21 08:11 KircMax

Hey, I'd like to tackle this one.

I was just thinking about how to test for this behaviour. Switching the tfm from net48 to .netcoreapp3.1 did not reveal anything, tests still passing.

Hmm testing will be a challenge anyway since that would require a real or simulated PLC...

Stefan-J-Hanke avatar Nov 11 '21 08:11 Stefan-J-Hanke

Hey @Stefan-J-Hanke! I'm happy you are interested in contributing - please read the aggreement first.

Yes - the unittests are not "harmed" when using .netcoreapp3.1 I also already noticed that.

"Real" tests (Integrationtests) will not be checked in and performed since the cicd will not be able to perform such... In general it would be possible to test the functionality with a plcsim advanced and everything but that's nothing we want to put that much effort in currently... So far I didn't find a way to get the problems with .netcore up using UnitTests but maybe the solution would also give a hint on how to verify .netcore support using a UnitTest - in case it doesn't I'd still be happy that it'd work on .netcore and I guess I could live with that blind spot in the unittests...

KircMax avatar Nov 12 '21 10:11 KircMax

Sorry for not responding - I'm busy atm...

Currently trying to get a PlcSim Advanced image with an activated webserver. For testing, I'll just hack something into a "unit" test (and of course not check in). My hope is that I can track down the issue and fix it.

Stefan-J-Hanke avatar Dec 03 '21 15:12 Stefan-J-Hanke

OK I now have a PLCSim Adv image whose web server should be activated.

I've switched to the net6.0 tfm. It does connect however it currently is blocked by the certificate validation. The prescribed hack with setting a ServerCertificateValidationCallback does not work, the callback never gets called.

Stefan-J-Hanke avatar Dec 08 '21 12:12 Stefan-J-Hanke

Glad you are making progress @Stefan-J-Hanke ... Are you using .netcore currently? (is it possible to install the certificate that the plcsim is using?)

KircMax avatar Dec 08 '21 13:12 KircMax