I am using OL3, Geoserver.
I made a website with Asp.net and add map with OL3. which is get data from geoserver with WFS. my website is located in C:\programfile\geoserver\www\mysite.
Also config IIS that when client (with IP 192.168.0.100) clicl IP of server, it will show the website. (server IP is 192.168.0.1)
the problem is that I receive this error.
XMLHttpRequest cannot load http://localhost:8000/geoserver/cite/ows?service=WFS&version=1.0.0&request=…e&typeName=cite:MyFeature&maxFeatures=50&outputFormat=application/json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.0.100' is therefore not allowed access.
how can I config IIS and Geoserver that solve this problem?
Googling, I've found an answer that can help you to set CORS if serving with Tomcat. CORS help you change Ajax "same origin policy" between domains.
Another alternative can be to use ARR (Application Request Routing) to use IIS as a proxy so everything seems to be coming from the same IP and you avoid same origin policy error you have at the moment; See this tutorial in this case.
Maybe, there are other solutions but I don't come from IIS world (using mainly Linux now)
I tried a lot to config IIS ARR reverse proxy but unfortunately it was not useful for me. Also using CORS is not good idea because some of the browsers don't support it.
So I became to write a proxy in asp.net by Generic handler. create proxy.ASHX file. then pass the url to this file. like: