Hi Venkat,
2014-03-05 6:15 GMT+01:00 venky <[email protected]>:
> Dear All,
>
> I have installed Geoserver 2.4.0 on Windows 2008 Server with IIS7.(without
> using Tomcat) I can render the Geoserver layer in my web application which
> is in my location machine. But when I click on any feature to get
> information, I have received the following error message.
>
> XMLHttpRequest cannot load
> http://xxx.xxx.xx.xx:8080/geoserver/cite/gwc/service/wms?LAYERS=cite%3APlym...%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A404000&X=802&Y=320<http://192.168.0.161:8080/geoserver/cite/gwc/service/wms?LAYERS=cite%3APlymouth_Buildings,cite%3APlymouth_Buildings&QUERY_LAYERS=cite%3APlymouth_Buildings,cite%3APlymouth_Buildings&STYLES=,&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=248556.234266%2C55257.75593%2C248953.095734%2C55439.44407&FEATURE_COUNT=10&HEIGHT=586&WIDTH=1280&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A404000&X=802&Y=320>.
> No 'Access-Control-Allow-Origin' header is present on the requested
> resource. Origin 'http://localhost:3311 <http://localhost/>' is therefore
> not allowed access.
>
>
>
This happens because the info feature needs to be done using an Ajax
request and by default Ajax requests are limited by all browsers to only
connect to the domain hosting your web application. Any time you access
geoserver on a different domain you will get that error, unless, as you
said, Tomcat is configured to add an "Access-Control-Allow-Origin" header
to allow which clients can connect.
So you have two solutions:
- put your web application and geoserver on the same domain
- enable CORS on the geoserver Tomcat, as you did in your example
configuration (maybe you can limit access only to your webapp host instead
of allowing any client)
Mauro
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users