Select to view content in your preferred language

Avoid Proxy page for Print Task, Print Template; Geometry Service

2803
13
11-09-2016 02:24 PM
PitersonPaulgek
Deactivated User

Hi there,

Is it possible to avoid using proxy page when

1) create pdf file with Print Task, Print Template?

2) use Geometry Service for Buffer

Any help would be appreciated.

esriConfig.defaults.geometryService = new GeometryService("some URL");

   

esriConfig.defaults.io.proxyUrl = "/proxy/"; - HERE WE MUST PUT CORRECT ADDRESS

esriConfig.defaults.io.alwaysUseProxy = false;

0 Kudos
13 Replies
PitersonPaulgek
Deactivated User

Robert, our web server is different machine.

0 Kudos
PitersonPaulgek
Deactivated User

Robert,

Can you please clarify when you say "You do not have to use a proxy when using the PrintTask"

That means use CORS? 

Can you please send link to working example that do not uses proxy and do not uses CORS?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

I am not sure what you have against using a proxy. But you will likely encounter a need to use one sooner rather than latter, once you get a service request that exceeds the URL params text limit.


But you will not need a proxy if your services and your web server are on the same machine and/or you have your server CORS enabled and added to the cots enabled servers array.


I don't have any examples for you right now.

AdrianMarsden
Honored Contributor

Similar with me.

I am trying to avoid the proxy (more later) all works fine, apart from printing in IE11 when I get the "If making a request to a CORS enabled server, please push the domain into esri.config.defaults.io.corsEnabledServers." - even through I do push the site that I am making a request to,

The reason why I'm switching proxy off, apart from performance, is that I just can't get my head around the config for testing, we now are using a proper version control in Visual Studio so I have to test using VS, and the "localhost" seems to fail, even when I change the config.

Although I'm going to look at why that is later, if I can move away totally it would be great.

Any ideas why just IE11 is having issues?

0 Kudos