Querytask using Circle

2908
10
04-19-2016 06:44 AM
ADITYAKUMAR1
Occasional Contributor III


Hi Users,

I am using the link Edit fiddle - JSFiddle  in order to query the feature layer with a new layer.

I need to perform query for rectangle/Extent, Freehand Polygon and Circle.

For rectangle and Polygon the example is working fine.But when I am executing the same with Circle its not showing any result.

Its giving the error Unable to load /XXXXXXXXXXXMapSearch/DotNet…Global/2D_DREAM_EPE/MapServer/3/query status: 403"

But I have configured the proxy , still I am getting the same error.  Any idea how to resolve it?

Thanks

Aditya kumar

0 Kudos
10 Replies
RobertScheitlin__GISP
MVP Emeritus

Aditya,

  Sounds like something is not properly configured in your proxy. If you can provide more info I may be able to help.

ADITYAKUMAR1
Occasional Contributor III

Hi Robert,

Thanks for the reply. I have configured the proxy as mentioned in the github readme file.

I am able to pass the data of services.arcgis.com and its giving me the data.

Apart from this anything am I missing?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Aditya,

  So seem to be sharing so little info it is hard to help. The url that is returning 403 in the console is that base portion of the url added to your proxy.config, serverUrls?

ADITYAKUMAR1
Occasional Contributor III

Hi Robert,

   I have added the base as well as the full url.I am attaching screenshot of the proxy file.

Hope this will help.

When I am trying to execute the query I am getting the following error.

Any suggestion on this will be helpful.

Thanks

Aditya Kumar

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Aditya,

  You do not want to use the full url (that is the purpose of matchAll="true") and you do want the baseurl that you have marked out in your images. When you have the proxy configured properly then you will not receive the error you show in your second image

ADITYAKUMAR1
Occasional Contributor III

Hi Robert,

Do you feel its a security issue? I am sharing one more screenshot

Thanks

Aditya Kumar

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Aditya,

  So do you have your localhost setup to require login? What happen when you enter this url into your browser http://localhost/DotNet/proxy.ashx?ping

Do you get a login screen?

0 Kudos
ADITYAKUMAR1
Occasional Contributor III

No Robert,

  When I put the url its says configuration ok

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Aditya,

OK so that says that the proxy is working properly. So the map service url that you are using must be secured then. If that is the case then you will need to make sure that the base url with https:// is added as a serverURL to the proxy.config. From what I see in your screenshots you have http://yourbaseurl.com added but not the https:// each of those urls are considered unique by the proxy. And if you want to bypass the login part then you can provide the username and password parameters in the serverURL object as well.

0 Kudos