A couple more options:

* Configure IIS to handle the CORS callbacks -
http://enable-cors.org/server_iis7.html

* Configure IIS to act as a reverse proxy using AAR -
http://blogs.msdn.com/b/carlosag/archive/2010/04/02/setting-up-a-reverse-proxy-using-iis-url-rewrite-and-arr.aspx

* Update the web.xml file within the geoserver.war file using the syntax
above; you may also need to add the cors jar into the war file -
http://software.dzhuvinov.com/cors-filter-installation.html

I've successfully used both the AAR and cors-filter approaches on larger
projects.

Hope this helps.

David


On Fri, Aug 15, 2014 at 12:11 PM, Mitchel <[email protected]> wrote:

> venky <venky.src <at> gmail.com> writes:
>
> >
> >
> > Dear All,
> >
> > I have installed Geoserver 2.4.0 on Windows 2008 Server with
> IIS7.(without
> using Tomcat) I can render the Geoserver layer in my web application which
> is in my location machine. But when I click on any feature to get
> information, I have received the following error message.
> >
> >
> > XMLHttpRequest cannot load
> http://xxx.xxx.xx.xx:8080/geoserver/cite/gwc/service/wms?LAYERS=cite%3APlym
> …
> %2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A404000&X=802&Y=320.
> No 'Access-Control-Allow-Origin' header is present on the requested
> resource. Origin 'http://localhost:3311' is therefore not allowed access.
> >
> >
> > The same issue I have faced when I was configured the Geoserver on
> Tomcat7
> in another Windows 2008 Server. At that time I have added the below things
> in C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\web.xml
> file.
> Afterthat issue was solved.
> >
> >
> >
> >
> >
> > <filter>
> >   <filter-name>CorsFilter</filter-name>
> >   <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
> >   <init-param>
> >     <param-name>cors.allowed.origins</param-name>
> >
> >     <param-value>*</param-value>
> >   </init-param>
> >   <init-param>
> >     <param-name>cors.allowed.methods</param-name>
> >     <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
> >
> >   </init-param>
> >   <init-param>
> >     <param-name>cors.allowed.headers</param-name>
> >     <param-value>Content-Type,X-Requested-With,accept,Origin,Access-
> Control-Request-Method,Access-Control-Request-Headers</param-value>
> >
> >   </init-param>
> >   <init-param>
> >     <param-name>cors.exposed.headers</param-name>
> >     <param-value>Access-Control-Allow-Origin,Access-Control-Allow-
> Credentials</param-value>
> >
> >   </init-param>
> >   <init-param>
> >     <param-name>cors.support.credentials</param-name>
> >     <param-value>true</param-value>
> >   </init-param>
> >
> >   <init-param>
> >     <param-name>cors.preflight.maxage</param-name>
> >     <param-value>10</param-value>
> >   </init-param>
> > </filter>
> >
> >
> > <filter-mapping>
> >   <filter-name>CorsFilter</filter-name>
> >   <url-pattern>/*</url-pattern>
> > </filter-mapping>
> >
> > So how & where should I add this in my current case. Kindly give me a
> solution to fix this error. Thanks in advance
> >
> >
> > Thanks & Regard,
> > Venkat E,
> > GIS Developer.
> >
> >
> >
> >
> >
> --------------------------------------------------------------------------
> ----
> > Subversion Kills Productivity. Get off Subversion & Make the Move to
> Perforce.
> > With Perforce, you get hassle-free workflows. Merge that actually works.
> > Faster operations. Version large binaries.  Built-in WAN optimization and
> the
> > freedom to use Git, Perforce or both. Make the move to Perforce.
> > http://pubads.g.doubleclick.net/gampad/clk?
> id=122218951&iu=/4140/ostg.clktrk
> >
> > _______________________________________________
> > Geoserver-users mailing list
> > Geoserver-users <at> lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
> >
>
> Hi Venkat,
>
> I added the code you specified to the bottom of the tomcat8/conf/web.xml
> file and I still get No 'Access-Control-Allow-Origin' error. Is there a
> step
> im missing? The last bit of my web.xml code looks like this:
>
>  <mime-mapping>
>         <extension>zmm</extension>
>         <mime-type>application/vnd.handheld-entertainment+xml</mime-type>
>     </mime-mapping>
>
>   <!-- ==================== Default Welcome File List =====================
> -->
>   <!-- When a request URI refers to a directory, the default servlet looks
> -->
>   <!-- for a "welcome file" within that directory and, if present, to the
> -->
>   <!-- corresponding resource URI for display.
> -->
>   <!-- If no welcome files are present, the default servlet either serves a
> -->
>   <!-- directory listing (see default servlet configuration on how to
> -->
>   <!-- customize) or returns a 404 status, depending on the value of the
> -->
>   <!-- listings setting.
> -->
>   <!--
> -->
>   <!-- If you define welcome files in your own application's web.xml
> -->
>   <!-- deployment descriptor, that list *replaces* the list configured
> -->
>   <!-- here, so be sure to include any of the default values that you wish
> -->
>   <!-- to use within your application.
> -->
>
>     <welcome-file-list>
>         <welcome-file>index.html</welcome-file>
>         <welcome-file>index.htm</welcome-file>
>         <welcome-file>index.jsp</welcome-file>
>     </welcome-file-list>
>
> <filter>
>   <filter-name>CorsFilter</filter-name>
>   <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
>   <init-param>
>     <param-name>cors.allowed.origins</param-name>
>     <param-value>*</param-value>
>   </init-param>
>   <init-param>
>     <param-name>cors.allowed.methods</param-name>
>     <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
>   </init-param>
>   <init-param>
>     <param-name>cors.allowed.headers</param-name>
>
> <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-
> Request-Method,Access-Control-Request-Headers</param-value>
>   </init-param>
>   <init-param>
>     <param-name>cors.exposed.headers</param-name>
>     <param-value>Access-Control-Allow-Origin,Access-Control-Allow-
> Credentials</param-value>
>   </init-param>
>   <init-param>
>     <param-name>cors.support.credentials</param-name>
>     <param-value>true</param-value>
>   </init-param>
>   <init-param>
>     <param-name>cors.preflight.maxage</param-name>
>     <param-value>10</param-value>
>   </init-param>
> </filter>
> <filter-mapping>
>   <filter-name>CorsFilter</filter-name>
>   <url-pattern>/*</url-pattern>
> </filter-mapping>
>
> </web-app>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to