[OpenLayers-Users] GetFeatureInfo... Access denied..

JuKiM rifins at gmail.com
Thu Nov 19 12:03:23 EST 2009


Hi,

I've been testing in IE.. If I create a 'test.html' file in a folder under
IIS, I get an error of denied access/resource not available.. But if I copy
that file in the www folder of geoserver, then everything works ok.. This is
quite logical, because IIS is running on port 80, and geoserver in 8080
(They are different hosts)...

Then when I declare the proxy, the IIS's test.html, the response i get is
empty..
And looking in Openlayers.js I've seen where the url is initialized before
the .open, and I think that I'm doing something wrong, because the final url
is not a correct one..


if(config.proxy&&(url.indexOf(
"http")==0)){
            url=config.proxy+encodeURIComponent(url);
}
request.open(config.method,url,config.async,config.user,config.password);


before "recoding" the url, it has the value:
http://localhost:8080/geoserver/wms?REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fvnd.ogc.se_xml&BBOX=-188.610843%2C-60.534809%2C189.241843%2C149.772809&X=104&Y=236&INFO_FORMAT=text%2Fplain&QUERY_LAYERS=G4WD%3Aus_states&FEATURE_COUNT=50&Layers=G4WD%3Aus_states&Styles=&Srs=EPSG%3A4269&WIDTH=1078&HEIGHT=600&format=image%2Fpng

And after, it has the value
/geoserver/rest/proxy?url=http%3A%2F%2Flocalhost%3A8080%2Fgeoserver%2Fwms%3FREQUEST%3DGetFeatureInfo%26EXCEPTIONS%3Dapplication%252Fvnd.ogc.se_xml%26BBOX%3D-188.610843%252C-60.534809%252C189.241843%252C149.772809%26X%3D104%26Y%3D236%26INFO_FORMAT%3Dtext%252Fplain%26QUERY_LAYERS%3DG4WD%253Aus_states%26FEATURE_COUNT%3D50%26Layers%3DG4WD%253Aus_states%26Styles%3D%26Srs%3DEPSG%253A4269%26WIDTH%3D1078%26HEIGHT%3D600%26format%3Dimage%252Fpng
whichs seems not to be correct..

I don't know if i'm forgetting something.. Any idea?

Thanks!


2009/11/19 stash <steffen.schwarz85 at googlemail.com>

>
>
>
> Quim Rifà wrote:
> >
> > Hi list,
> >
> > I know that tere are so many comments about that, but no one is solving
> my
> > problem..
> >
> > I have geoserver serving a WMS vector layer that has some features... I
> > have
> > the geoserver running in localhost:8080, and the application that I'm
> > testing, is running in localhost:3015.. And I suppose that due de
> > different
> > ports, when I try to do a GetFeatureInfo (clicking anywhere on the map),
> > it
> > says "access denied".. In the XMLHttpRequest.open(...).
> >
> > I've added the proxy following the instructions found in "
> > http://geoserver.org/display/GEOS/GeoServer+Proxy+Extension".. But it
> > still
> > says that there is no access..
> > Then I tryied to initialize the proxy host, in the "function Init()",
> > writing "OpenLayers.ProxyHost = "/geoserver/rest/proxy?url=";" And now
> > what
> > it says, is that it can't find the resource, and suggest to verify the
> url
> > "/geoserver/rest/proxy"
> >
> > What is happening with that? Any idea?
> >
> > Thanks!!
> >
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> >
> >
>
>
> Hello,
> I had the same problem and I know that this can be really frustrating. But
> you can try the following things.
>
> Thereby your html site and geoserver are running on the same pc (localhost)
> you don't need a proxyhost. Set it in comments in your html.
>
> Try it out with different browsers. Firefox always blocked my request and
> with Internet Explorer it worked.
>
> Maybe this helps.
>
> Regards
> stash
>
> --
> View this message in context:
> http://n2.nabble.com/GetFeatureInfo-Access-denied-tp4032182p4032903.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091119/0b79dee2/attachment.html


More information about the Users mailing list