Problem printing WMS that uses windows authentication (JS 4.4)

08-11-2017 06:40 AM
New Contributor III

Hi all,

I need to consume an external WMS-service that uses windows authentication.

I have configured the Esri-resource-proxy with creedentials and I am able to add the service to the map. No problem.
But when I try to print the map using the print widget, it fails.

The problem is that print service does not receive the proxy-url inside the print request.
I think that if there are any proxy rules in the client, they should also be forwarded to the printservice.

Bug? Have I missed something? Is there an easier solution to this problem?

JS 4.4
resource-proxy 1.1.0

Arne Dahlman

0 Kudos
2 Replies
Esri Contributor

Hi Arne,

One option could be to use a modified version of the resource proxy: 

There might also be other usable proxies, like Apache with some proxy module and a bit of rewriting the resource URL:s, or MapProxy perhaps.

We have used the proxy I linked to above with success when using it on some Swedish services with Http Basic Authentication (which is the reason it was modified).

Best regards,

0 Kudos
New Contributor III

Hi Sverker,

Thanks for your response.

My main problem was that no proxy information was forwarded to the printservice.
I think this is a bug in JS4. Proxy information should be honored also when Printing.

In our previous Silverlight application we also had this problem. Here we could write the url like this to bypass the problem:
In JS4 this trick is no longer working. The url gets chopped.

Our problem was solved in another way. We have the product F5, which is a lokal trafic manager.
With F5 it is possible to do som url-rewriting like you suggest in your answer.

The client points to F5 like it is a lokal network WMS-server (no proxy configuration in client).
In F5 the url is changed from:

The resource proxy is still needed for handelning the basic authentication.

Interesting fork you have made of the resurce-proxy.
I think it might solve som other issues we have. I'll definitely test it.

Best regards

0 Kudos