Hi,
We have been successfully returning client mapping data to display through MapWinGIS using a wmslayer. Suddenly this data stopped being displayed and we haven’t changed our code. One thing that has changed however is that the client has recently migrated their DNS hosting to a different provider and a consequence of this is that their webservices no longer support versions of TLS older than 1.2.
Does anyone know which version of TLS MapWinGIS supports? NB: I have been unable to track mapwingis through a network logger (fiddler) to determine this myself.
The layers I am attempting to connect to are not all open WMS layers however we have been able to setup temporary access on a test url to mimic the setup, with just one of the layers for testing (the only one which is an open data layer).
I tried out the link and I can see it works in QGIS, but I haven’t got it to work in MapWinGIS yet - do you have an example, full url that should work, complete with SRS / boundingbox etc.
I have never got it to load using epsg 27700 (British National Grid) but a bounding box set of extents for epsg 27700 would be objExtents.SetBounds(0, 0, 0, 700000.0, 1300000.0, 0). However, it only loaded up previously when specifying epsg 3857 and the associated extents for that.
I tried your example above (converted to C#) and I just see nothing. When I hover over the map, the whole thing dies instantly. Is this the sort of thing you’re seeing?
When I try to add the layer, the _WMSlayerhandle variable gets updated (implying the AddLayer mapwingis method has run) but the map remains as it is without any new OS layer being displayed. My map doesn’t die though, I can interact with it, just without the required layer being displayed.
The application crashing was a me problem. It’s now just like you describe. Seemingly valid, but does not display.
In our software here we have functionality to add WMS layers which works differently than your example (doesn’t use WMSLayer) and that is giving me a “Parameter is not valid” error when calling it.
I’m beginning to feel like this might be a MapWinGIS problem. However you said it used to work (although there have been changes to the WMS). Have you upgraded MapWinGIS recently?
In any case, if I log the requests, I see entries like:
If you cut and paste the url into a browser from the above it actually works, so why is it saying, “ERROR”?
If I can make our way of doing things work, then I can see if I can share that with you, but it wouldn’t be my recommended way of doing it. I’m guessing it was done before native support was added.
I think it’s good that the request in your log works in a browser as it shows we are building up the url as required.
In discussion with our data provider it was thought (see first post) that the issue might be a result of the WMS provider migrating their DNS hosting to a different provider, a consequence of which their webservices no longer support versions of TLS older than 1.2, with the suspicion being that MapWinGIS possibly uses TLS 1.1 or older.
That could explain why it continues to work in QGIS/browsers but no longer in MapWinGIS.
I’ve made some progress, I can now load the WMS in our software. The problem (in our software) was that it didn’t like that the STYLES parameter was being set to “default” it wanted it as “STYLES=”. Removing that made it load (and in EPSG:27700) I believe.
I am virtually certain the problem is not TLS versions, because:
I’ve got it to work
I use other WMS that only allow a minimum TLS of 1.2 and they work
I think there is probably a problem in MapWinGIS WMSLayer functionality because:
I can’t get other WMS that work in my software to work using your/MapWinGIS method of adding them (WMSLayer)
We now know it is possible for it to work with MapWinGIS in general
I note a number of issues have been raised previously where it was hoped updates would fix (similar sounding) problems, but there is no follow up to know if that was true.
Hopefully this is helpful. I can look into whether it’s worth sharing the alternative method code with you (and if I’m allowed), otherwise hopefully can talk you round it - however I might not be able to for a couple of days or so.
It’s good you got it to display in your software.
I checked the styles variable in my wmslayer code and that is passed as a blank string so should be ok, and at least match up with what got to work.
What I still can’t work out is what has caused my implementation to stop displaying the map layers when we haven’t changed MapWinGIS versions or even the code that calls them.
I’ll keep investigating but please let me know if you are able to describe the method you were successful using.
We managed to resolve this by setting it up as a custom tile provider and using a wmts link and discarding the previous work done using the wms layer class.