Overview:
In order to see a map image in a viewer, your web browser must be able to make a web request for the map image. Sometimes, restrictions beyond our control prevent this, such as:
A similar application is included with the Geocortex Viewer for HTML5. The purpose of the proxy page is to provide access to resources that you would otherwise be unable to access.
Solution:
To configure the Geocortex Viewer for HTML5 to use a proxy page:
The line in proxy.config would be something like:
http://myserver.domain.com/proxy.ashx?https://remote.server.com/ArcGIS/rest/services?f=json
If you're having trouble using a proxy page with the HTML5 Viewer, please contact Geocortex Support (support@geocortex.com)
In order to see a map image in a viewer, your web browser must be able to make a web request for the map image. Sometimes, restrictions beyond our control prevent this, such as:
- Making a request to the server violates a cross-domain, cross-scheme, or cross-zone policy
- The services we wish to consume are published on a network we can't access directly
- The services are secured in a way that our plugin / API / browser cannot traverse
- The remote site administrator has not configured a cross domain policy file
A similar application is included with the Geocortex Viewer for HTML5. The purpose of the proxy page is to provide access to resources that you would otherwise be unable to access.
Solution:
To configure the Geocortex Viewer for HTML5 to use a proxy page:
- Configure the Proxy Page to Connect to the Map Service
- Configure a Viewer, Service Connection or Map Service to use the Proxy Page
Configure the Proxy Page to Connect to The Map Service
To configure the proxy page, edit the proxy.config file that exists where you've deployed the Viewer template (default: C:\inetpub\wwwroot\Html5Viewer). Add an entry for the URL that you want to allow the proxy to pass requests to. For your password protected services, you may also provide a token (a long-lived token), or modify the proxy.ashx code to have it request a token on-demand.NOTE: doing this will bypass the password protection on the remote server. Be sure this does not violate the terms of any agreement with your upstream provider!
The line in proxy.config would be something like:
<serverUrl url="https://MyServerURL.com/ArcGIS/rest/services/" matchAll="true"></serverUrl>
Configure a Viewer, Service Connection or Map Service to use the Proxy Page
Configure a Viewer to use the Proxy Page:- In Essentials Manager, open the Viewer for editing.
- In the left-side menu, select Application.
- In the Proxy URI: field, specify the URI of your proxy page. A relative URL is preferred, since the proxy page is being used to ensure that we're connecting to a known URL. For the proxy page that comes with the HTML5 Viewer, enter: proxy.ashx?
- Apply Changes and Save Site.
- In Essentials Manager, open Service Connections.
- Select your Service Connection in the left menu, or click Add Connection to create a new one.
- Under Proxy Settings, in the Proxy URL: field, specify the URI of your proxy page.
- Apply Changes and Save Site.
- In Essentials Manager, open the Site for editing.
- In the left-side menu, select Map, then go to the Map Services tab.
- Click the Edit map service icon.
- Click the Edit Connection Settings button.
- Under Proxy Settings, select Proxy Page.
- In the Proxy URL: field, specify the URL of your proxy page.
- Apply Changes and Save Site.
http://myserver.domain.com/proxy.ashx?https://remote.server.com/ArcGIS/rest/services?f=json
If you're having trouble using a proxy page with the HTML5 Viewer, please contact Geocortex Support (support@geocortex.com)
Comments
0 comments
Article is closed for comments.