Matvei & Gonzalo,
I have been using Runtime SDK .NET and GeoServer. With GeoServer 2.12.1 and Runtime 100.4, WMTS was working quite well for raster layers. After updating GeoServer to 2.14.1 WMTS layers (using the exact same Runtime SDK code) failed to display. I have tracked down the issue to the fact that GeoServer 2.12.1 did not send Layer Resource URL elements in the capabilities documents, and in newer versions it does. To verify this is source of the issue, I modified the Geowebcache gwc-wmts library used by GeoServer to not include the Layer Resource URL elements (in bold below), and my raster layers displayed properly.
Here are the lines in the WMTS Capabilities document which break Runtime SDK WmtsLayer for raster data:
<Layer>
<Style isDefault="true">
<ows:Identifier>raster</ows:Identifier>
<LegendURL format="image/png" xlink:href="http://localhost:8080/geoserver/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20..." width="20" height="20"/>
</Style>
...
<ResourceURL format="image/png" resourceType="tile" template="http://localhost:8080/geoserver/gwc/rest/wmts/TestWS:World/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}?format=image/png"/>
<ResourceURL format="image/jpeg" resourceType="tile" template="http://localhost:8080/geoserver/gwc/rest/wmts/TestWS:World/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}?format=image/jpeg"/>
<ResourceURL format="text/plain" resourceType="FeatureInfo" template="http://localhost:8080/geoserver/gwc/rest/wmts/TestWS:World/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=text/plain"/>
<ResourceURL format="application/vnd.ogc.gml" resourceType="FeatureInfo" template="http://localhost:8080/geoserver/gwc/rest/wmts/TestWS:World/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=application/vnd.ogc.gml"/>
<ResourceURL format="text/xml" resourceType="FeatureInfo" template="http://localhost:8080/geoserver/gwc/rest/wmts/TestWS:World/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=text/xml"/>
<ResourceURL format="application/vnd.ogc.gml/3.1.1" resourceType="FeatureInfo" template="http://localhost:8080/geoserver/gwc/rest/wmts/TestWS:World/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=application/vnd.ogc.gml/3.1.1"/>
<ResourceURL format="text/xml" resourceType="FeatureInfo" template="http://localhost:8080/geoserver/gwc/rest/wmts/TestWS:World/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=text/xml"/>
<ResourceURL format="text/html" resourceType="FeatureInfo" template="http://localhost:8080/geoserver/gwc/rest/wmts/TestWS:World/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=text/html"/>
<ResourceURL format="application/json" resourceType="FeatureInfo" template="http://localhost:8080/geoserver/gwc/rest/wmts/TestWS:World/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}?format=application/json"/>
</Layer>
So it looks like GeoServer is advertising tile and feature REST endpoints, but then puking when the client tries to access them. The KVP endpoints still work, as demonstrated in the tile layer preview in GeoServer web app, but the client must ignore the REST capability and use KVP only to work.
Furthermore, upon inspecting the requests generated by Runtime SDK WMTS layer, it seems to choose the "FeatureInfo" "application/json" resource, for which it cannot fill in the parameters correctly (see below). in spite of setting PreferredImageFormat = TileImageFormat.Png before LoadAsync(). That would not work even if GeoServer was properly implementing the REST endpoints. I changed geowebcache to only include the tile Resource URLS and the tile requests were formatted properly, but GeoServer still returns 404 response code.
So it is broken on both ends.
http://localhost:8080/geoserver/gwc/rest/wmts/TestWS:World/%7Bstyle%7D/EPSG:4326/EPSG:4326:0/0/0/%7B...
For the time being the only solution seems to be to force KVP. As this was removed on the SDK client side, you'll need to stick with GeoServer 2.12.1 or modify/revert Geowebwebcache gwc-wmts-1xxx.jar
Another alternative may be the TMS service, which I think is supported in GeoServer.
Hope this is helpful,
Charles