tiled WMS sample error

Topics: SharpMap v0.9 / v1.x, WinForms Controls
Jun 8 at 8:29 AM
When using the tiledWMS sample in the Winform sample I get an error: "The given key was not present in the dictionary"

I can not step into the code to see whats happening here. What am I doing wrong?
        Map map = new Map();
        string url = "http://resource.sgu.se/service/wms/130/brunnar?SERVICE=WMS&VERSION=1.3&REQUEST=getcapabilities&TILED=true";
        TileAsyncLayer tileLayer;
        var source = new List<ITileSource>(WmscTileSource.CreateFromWmscCapabilties(new System.Uri(url)));  //this line throws the error... can not step into (F11)
        tileLayer = new TileAsyncLayer(source[16], "grundvatten:SE.GOV.SGU.BRUNNAR.250K" + source[16]);
        tileLayer.MapNewTileAvaliable += map.MapNewTileAvaliableHandler;
        map.BackgroundLayer.Add(tileLayer);
        map.ZoomToExtents();
        return map;
callstack
WinFormSamples.exe!WinFormSamples.FormMapBox.radioButton_Click(object sender, System.EventArgs e) Line 604 C#
System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e)   Unknown
System.Windows.Forms.dll!System.Windows.Forms.RadioButton.OnClick(System.EventArgs e)   Unknown
System.Windows.Forms.dll!System.Windows.Forms.RadioButton.OnMouseUp(System.Windows.Forms.MouseEventArgs mevent) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message m, System.Windows.Forms.MouseButtons button, int clicks)   Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m)   Unknown
System.Windows.Forms.dll!System.Windows.Forms.ButtonBase.WndProc(ref System.Windows.Forms.Message m)    Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m)   Unknown
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam)  Unknown
[Native to Managed Transition]  
[Managed to Native Transition]  
System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(System.IntPtr dwComponentID, int reason, int pvLoopData)  Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason, System.Windows.Forms.ApplicationContext context)    Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form form) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window owner)  Unknown
System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog() Unknown
WinFormSamples.exe!WinFormSamples.DlgSamplesMenu.button2_Click(object sender, System.EventArgs e) Line 21   C#
System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e)   Unknown
System.Windows.Forms.dll!System.Windows.Forms.Button.OnClick(System.EventArgs e)    Unknown
System.Windows.Forms.dll!System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs mevent)  Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WmMouseUp(ref System.Windows.Forms.Message m, System.Windows.Forms.MouseButtons button, int clicks)   Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc(ref System.Windows.Forms.Message m)   Unknown
System.Windows.Forms.dll!System.Windows.Forms.ButtonBase.WndProc(ref System.Windows.Forms.Message m)    Unknown
System.Windows.Forms.dll!System.Windows.Forms.Button.WndProc(ref System.Windows.Forms.Message m)    Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.OnMessage(ref System.Windows.Forms.Message m) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Control.ControlNativeWindow.WndProc(ref System.Windows.Forms.Message m)   Unknown
System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(System.IntPtr hWnd, int msg, System.IntPtr wparam, System.IntPtr lparam)  Unknown
[Native to Managed Transition]  
[Managed to Native Transition]  
System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(System.IntPtr dwComponentID, int reason, int pvLoopData)  Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason, System.Windows.Forms.ApplicationContext context)    Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) Unknown
System.Windows.Forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form mainForm)   Unknown
WinFormSamples.exe!WinFormSamples.Program.Main() Line 37    C#
[Native to Managed Transition]  
[Managed to Native Transition]  
mscorlib.dll!System.AppDomain.ExecuteAssembly(string assemblyFile, System.Security.Policy.Evidence assemblySecurity, string[] args) Unknown
Microsoft.VisualStudio.HostingProcess.Utilities.dll!Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()   Unknown
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state)    Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart()    Unknown


Coordinator
Jun 8 at 9:42 AM
The server does not expose that it can perform tiled wms. This has to be stated in the VendorSpecificCapabilities node of the GetCapabilities xml document.
There is no such node.
Marked as answer by stenvall on 6/8/2016 at 1:43 AM
Jun 8 at 9:45 AM
Thank you!
Jun 8 at 3:04 PM
So this is av WMS-C service, not a WMS service! and to speed things up I have to use som other library... like dotspatial and brutilelayer?
Coordinator
Jun 8 at 3:26 PM
stenvall wrote:
So this is av WMS-C service, not a WMS service! and to speed things up I have to use som other library... like dotspatial and brutilelayer?
Says who?
I have tried to use it with BruTile (latest version) and it fails to parse the returned capabilities document.
The TiledLayerSample uses BruTile under the hood, too.

If it is a WMS-C service than either the URL is not pointing at the right service or BruTile is not handling WMS-C parsing correctly.
Jun 8 at 3:33 PM
Sorry... I meant to write the oposite... that I think that it is a WMS service and not a WMS-C service since it cant handle the tiling