# Loding WMS Layer with username and password

**URL:** <https://mapwindow.discourse.group/t/loding-wms-layer-with-username-and-password/1482>\
**Category:** Uncategorized\
**Created:** [January 16, 2023, 8:26am UTC](https://mapwindow.discourse.group/t/loding-wms-layer-with-username-and-password/1482 "2023-01-16T08:26:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Heden](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Daniel\_Heden](https://mapwindow.discourse.group/u/Daniel_Heden)\
**Post date:** [January 16, 2023, 8:26am UTC](https://mapwindow.discourse.group/t/loding-wms-layer-with-username-and-password/1482/1 "2023-01-16T08:26:40Z")

</div>

Hello everybody,

I am working on an application that uses MapWinGIS and i need to be able to load WMS layer that need authentication with username and password.

With WmsLayer it seems not to be supported or have I missed something?

Regards  
Daniel

---

<div class="post-metadata">

**Author:** ![frank2x460](https://avatars.discourse-cdn.com/v4/letter/f/b5a626/32.png) [@frank2x460](https://mapwindow.discourse.group/u/frank2x460)\
**Post date:** [January 26, 2023, 12:38pm UTC](https://mapwindow.discourse.group/t/loding-wms-layer-with-username-and-password/1482/2 "2023-01-26T12:38:03Z")

</div>

Hello Daniel,

here an example of an URL we use:

[http://user:password@xxxxxxxxxxxxxxxx.com/service](http://user:password@xxxxxxxxxxxxxxxx.com/service)?

Hope this helps.

Regards,  
Frank

---

<div class="post-metadata">

**Author:** ![Daniel\_Heden](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Daniel\_Heden](https://mapwindow.discourse.group/u/Daniel_Heden)\
**Post date:** [June 28, 2023, 6:51am UTC](https://mapwindow.discourse.group/t/loding-wms-layer-with-username-and-password/1482/3 "2023-06-28T06:51:13Z")

</div>

Hi Frank,

Adding it to the URL did not work for me.

But by doing this where i set the login for a given host using the TileClass.  
var tiles = new TilesClass();  
tiles.SetProxyAuthentication(user, password, host);

Then the WMS Layer is loaded correctly from a password protected service.

Regards  
Daniel
