I've been working through a few tutorial/starter map samples on the OpenGeo and GeoExt websites and have come upon a problem I cannot solve. I'm trying to load a list of layers from my GeoServer into a GridPanel using GeoExt.data.WMSCapabilitiesStore. No matter what I try, I cannot get anything to show in the GridPanel. I thought I had cross domain issues at first, but the problem persists even when the webpage and the GeoServer data are on the same server.

Here's a link to my very barren looking web map:

Here's the JavaScript that's supposed to access the wms and load the layer list:

    Ext.onReady(function() {
var grid = new Ext.grid.GridPanel({
    title: "Available WMS Layers",
    region: "north",
    height: 150,
    viewConfig: {forceFit: true},
    store: new GeoExt.data.WMSCapabilitiesStore({
        url: "",
        autoLoad: true
        columns: [
            {header: "Name", dataIndex: "name", sortable: true},
            {header: "Title", dataIndex: "title", sortable: true},
            {header: "Abstract", dataIndex: "abstract"}

Any help with this, or just ideas of where to look next would be greatly appreciated.


1 Answer 1


Different port numbers are considered as different domains - even if the rest of the URL is the same. So if your main site is running on:

You would need a proxy to access:

So the proxy FAQ below applies in your case:


Why can't you run both your web application and Geoserver on the same port?


You can also get around the same domain policy using YQL - http://geographika.co.uk/accessing-cross-domain-data-with-yql

  • I'm running GeoServer and IIS 7.5. Neither will let me set their port to the others port.
    – Don Meltz
    Commented Mar 18, 2011 at 18:45
  • @don You'll need a proxy, host the web site with GeoServer (on Apache), or you could try a URL rewrite approach - serverfault.com/questions/216004/… Commented Mar 18, 2011 at 18:51
  • Thanks geographika - I'm struggling with understanding how proxies work and how to set them up, and with the URL rewrite option. I'm thinking it might be easier to just move everything on to Apache.
    – Don Meltz
    Commented Mar 18, 2011 at 22:50
  • Unless you are using .NET in your web application, moving to Apache would be easier. If you need a proxy have a look at geographika.co.uk/a-proxy-for-iis-and-net - I think this should work with ports Commented Mar 18, 2011 at 23:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.