[OpenLayers-Users] GetFeatureInfo... Access denied..
bartvde at osgis.nl
bartvde at osgis.nl
Tue Nov 24 06:53:04 EST 2009
why don't you set:
OpenLayers.ProxyHost = 'test.aspx?param=';
and then you don't need to change anything inside of the OpenLayers library.
> Hi all,
> Finally I've decided to modify the openlayers call.
> Now I make the XmlHttpRequest.open against the same domain (The IIS served
> application), and there I redirect the call to geoserver, and then return
> the result to the client..
> I've modifyed the OpenLayers.js doing this:
> sUrl = "test.aspx?param=" + escape(sUrl); //Force the call to same domain
> this._object.open(sMethod, sUrl, bAsync, sUser, sPassword);
> And I've created a new page called test hosted in IIS, that catch the
> If Request.QueryString.Count <> 0 Then
> Dim wsResponse As XmlDocument = New XmlDocument()
> Dim param As String
> param = Request.QueryString("param") 'In the param we have the
> GeoServer URL
> Dim url As String = param
> Dim XMLDocument As String = wsResponse.InnerXml
> Response.ContentType = "text/xml"
> Response.Write(XMLDocument) 'We return the result from
> End If
> And doing that, I can do the XMLHttpRequest and get the response from
> Any advice/problem with doing in that way?
> On Thu, Nov 19, 2009 at 06:03:23PM +0100, JuKiM wrote:
>>> > Hi,
>>> > I've been testing in IE.. If I create a 'test.html' file in a folder
>>> > IIS, I get an error of denied access/resource not available.. But if
>>> > 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
>>> > (They are different hosts)...
>>> > Then when I declare the proxy, the IIS's test.html, the response i
>>> > empty..
>>> Your *IIS* needs the proxy. GeoServer has one built in, but it won't
>>> you in the slightest if your HTML page isn't hosted on GeoServer. So
>>> either host your page on geoserver's webserver, or get a proxy into
>>> whatever webserver you do need.
>>> -- Chris
> Users mailing list
> Users at openlayers.org
More information about the Users