# Problems with wmsrasterlayer

**URL:** <https://community.thinkgeo.com/t/problems-with-wmsrasterlayer/269>\
**Category:** WinForms\
**Created:** [March 9, 2009, 3:42pm UTC](https://community.thinkgeo.com/t/problems-with-wmsrasterlayer/269 "2009-03-09T15:42:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tjobst1587](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tjobst1587](https://community.thinkgeo.com/u/tjobst1587)\
**Post date:** [March 9, 2009, 3:42pm UTC](https://community.thinkgeo.com/t/problems-with-wmsrasterlayer/269/1 "2009-03-09T15:42:00Z")

</div>

Hallo,

I&nbsp;try&nbsp;to&nbsp;get&nbsp;datas&nbsp;from&nbsp;a&nbsp;wms-server&nbsp;in&nbsp;saxonia.&nbsp;You&nbsp;can&nbsp;see&nbsp;the&nbsp;uri&nbsp;in&nbsp;the&nbsp;code&nbsp;below.&nbsp;But&nbsp;all&nbsp;I&nbsp;get&nbsp;is&nbsp;the&nbsp;message,&nbsp;that&nbsp;the&nbsp;wms-server&nbsp;don't&nbsp;support&nbsp;the&nbsp;crs.&nbsp;I&nbsp;can't&nbsp;believe&nbsp;that.&nbsp;Can&nbsp;anybody&nbsp;help&nbsp;me?

&nbsp;

`        private void wms_sachsen()        {            WmsRasterLayer wmsLayer = new WmsRasterLayer(new Uri("landesvermessung.sachsen.de/ias/basiskarte4/service/SRV4TKFREE/WMSFREE_TK/wmsservice"));            wmsLayer.Parameters.Add("layers", "ms,ueb,tk100,tk100g");            //WmsRasterLayer wmsLayer = new WmsRasterLayer(new Uri("landesvermessung.sachsen.de/ias/basiskarte4/service/SRV4DOPFREE/WMSFREE_TK/WMSFREE_TK/wmsservice"));            //WmsRasterLayer wmsLayer = new WmsRasterLayer(new Uri(            wmsLayer.Parameters.Add("Exceptions", "application/vnd.ogc.se_xml");            wmsLayer.Parameters.Add("format", "image/png");            wmsLayer.Parameters.Add("transparent", "true");            wmsLayer.Parameters.Add("SRS", "EPSG:31468");            wmsLayer.Name = "WMS Layer";            if (!wmsLayer.IsOpen)            {                wmsLayer.Open();            }            // Set Active Layer names            foreach (string name in wmsLayer.GetServerLayerNames())            {                wmsLayer.ActiveLayerNames.Add(name);            }            wmsLayer.UpperThreshold = Double.MaxValue;            wmsLayer.LowerThreshold = 0;            wmsLayer.IsTransparent = true;            wmsLayer.Crs = "EPSG:31468";            wmsLayer.TimeoutInSecond = 35;            if (wmsLayer.IsOpen)            {                wmsLayer.Close();            }            this.map.StaticOverlay.Layers.Add(wmsLayer.Name, wmsLayer);        }`

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [March 10, 2009, 5:22am UTC](https://community.thinkgeo.com/t/problems-with-wmsrasterlayer/269/2 "2009-03-10T05:22:39Z")

</div>

&nbsp;

Torsten,  
  
&nbsp;

It&nbsp;throws&nbsp;that&nbsp;exception&nbsp;because&nbsp;it&nbsp;doesn't&nbsp;find&nbsp;the&nbsp;“EPSG:31468”&nbsp;on&nbsp;that&nbsp;server.&nbsp;After&nbsp;further&nbsp;investigation,&nbsp;I&nbsp;found&nbsp;that&nbsp;saxonia&nbsp;server&nbsp;does&nbsp;support&nbsp;the&nbsp;31468&nbsp;projection,&nbsp;but&nbsp;the&nbsp;format&nbsp;is&nbsp;a&nbsp;bit&nbsp;different&nbsp;from&nbsp;what&nbsp;we&nbsp;suppose&nbsp;to&nbsp;be.&nbsp;&nbsp;It&nbsp;includes&nbsp;all&nbsp;the&nbsp;supported&nbsp;SRSs&nbsp;in&nbsp;a&nbsp;long&nbsp;string,&nbsp;when&nbsp;we&nbsp;are&nbsp;trying&nbsp;to&nbsp;get&nbsp;the&nbsp;CRS&nbsp;array&nbsp;the&nbsp;server&nbsp;supports,&nbsp;for&nbsp;example&nbsp;we&nbsp;only&nbsp;get&nbsp;one&nbsp;“EPSG:31468&nbsp;EPSG:31469&nbsp;EPSG:31470&nbsp;EPSG:31471”&nbsp;instead&nbsp;of&nbsp;four,&nbsp;that&nbsp;makes&nbsp;the&nbsp;server&nbsp;failed&nbsp;to&nbsp;pass&nbsp;the&nbsp;CRS&nbsp;check.&nbsp;I&nbsp;think&nbsp;in&nbsp;the&nbsp;configuration&nbsp;file&nbsp;of&nbsp;the&nbsp;server,&nbsp;it's&nbsp;something&nbsp;like

\<sm:srs&nbsp;value=”EPSG:31468&nbsp;EPSG:31469&nbsp;EPSG:31470&nbsp;EPSG:31471”\>

and&nbsp;we&nbsp;are&nbsp;expecting&nbsp;something&nbsp;like

\<sm:srs&nbsp;value=”EPSG:31468”\>

\<sm:srs&nbsp;value=”EPSG:31469”\>

\<sm:srs&nbsp;value=”EPSG:31470”\>

\<sm:srs&nbsp;value=”EPSG:31471”\>

We&nbsp;will&nbsp;keep&nbsp;working&nbsp;on&nbsp;it&nbsp;and&nbsp;check&nbsp;if&nbsp;your&nbsp;srs&nbsp;format&nbsp;is&nbsp;also&nbsp;right.&nbsp;If&nbsp;yes&nbsp;we&nbsp;will&nbsp;support&nbsp;it&nbsp;in&nbsp;the&nbsp;future&nbsp;release.

Thanks,

Ben
