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

JuKiM rifins at gmail.com
Tue Nov 24 06:36:50 EST 2009


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
request:
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
            wsResponse.Load(url)
            Dim XMLDocument As String = wsResponse.InnerXml
            Response.Clear()
            Response.ContentType = "text/xml"
            Response.Write(XMLDocument) 'We return the result from GeoServer
        End If

And doing that, I can do the XMLHttpRequest and get the response from
GeoServer..

Any advice/problem with doing in that way?

Thanks!


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
>> 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..
>>
>> Your *IIS* needs the proxy. GeoServer has one built in, but it won't help
>> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091124/9f88d9b8/attachment.html


More information about the Users mailing list