WMS Client and authentication

Feb 8, 2007 at 5:37 AM
Hi. I just began looking at SharpMap, which is very impressive.

Just for fun, I thought I'd try using the WMS Client demo with another server, but that server requires authentication, and I see no way to supply credentials to the WmsLayer c'tor.

Just wondering how that's handled (e.g., CredentialCache.DefaultNetworkCredentials) ?
Coordinator
Feb 8, 2007 at 6:43 PM
Hi,

Credentials can't set in the c'tor, but they are available via the property Credentials.

regards
Christian
Feb 8, 2007 at 7:11 PM
Hi and thanks for the reply.

Unfortunately, the c'tor takes a URL and tries to connect to the server, which requires the credentials. Just to get it working, I overloaded the WmsLayer c'tor to take the credentials, and that worked as expected. I was only interested in seeing if I could get the sample app to connect to my server and obtain a list of layers, which it did flawlessly. I also added a treeview to the sample app, to show a hierarchial view of the layers. If anyone is interested in that I'll be happy to post it.
Coordinator
Feb 8, 2007 at 8:00 PM
This discussion has been copied to Work Item 8096. You may wish to continue further discussion there.
Coordinator
Feb 8, 2007 at 8:05 PM
Edited Feb 8, 2007 at 8:12 PM
Hi,

Just send your samples to my mail address( sharpmap@sharptools.de ) and I will include it in the official samples. Also send me your changes to the WmsClient to support credentials correctly.

regards
Christian