This question already has an answer here:
- How to configure Proxy.cgi with IIS 2 answers
I use OpenLyaers in order to show france Departements. My website is generated in ASP .NET MVC 4 (i use Visual studio 2012) ans i use GeoServer to store WFS files.
I want to access to my WFS layer by
var wfs = new OpenLayers.Layer.Vector("States", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
url: "http://localhost:8080/geoserver/wms",
featureType: "states",
featureNS: "http://www.openplans.org/topp"
})
});
map.addLayer(wfs);
In Google Chrome console i have :
XMLHttpRequest cannot load http://localhost:8080/geoserver/wms. Origin http://localhost:50431 is not allowed by Access-Control-Allow-Origin.
How i can parametre Geoserver to solve this problem ?