.NET Framework Developer Center > .NET Framework Forums > Windows Communication Foundation (WCF) > WCF SERVICE - wsdl Schema location problem behind firewall

Proposed Answer WCF SERVICE - wsdl Schema location problem behind firewall

  • Monday, January 12, 2009 8:50 AM
     
      Has Code
     

    Hi everybody, it’s almost 2 days that I’m going crazy with the following problem:

    We’ve developed and correctly tested in our development system a new WCF service.

    Our production server, in DMZ, is positioned behind a firewall redirecting the external IP (IPEXT) to an internal one (IPINT)

     

    http://IPEXT/App/Servizio.svc?wsdl


    unfortunately the schema locations on the wdsl are wrong because they are directed to the internal server:

     

    .....
    <wsdl:import namespace="http://IPExt/App/" location="http://IpINT/App/Servizio.svc?wsdl=wsdl0" />
    - <wsdl:types>
    - <xsd:schema targetNamespace="http://tempuri.org/Imports">
    <xsd:import schemaLocation="http://IpINT/App/Servizio.svc?xsd=xsd0" namespace="http://tempuri.org/" />
    </xsd:schema>
    .....

    In fact if I include the service in a client on the local network it works correctly, but if I do that from a client in the intranet…it doesn’t work (obviously he doesn’t know who’s that local network name)

    Please is someone able to tell me a way to force the schema location in my web.config file of the service?

    Hope that my explanation of the problem is clear!

    Thanks a lot for all the help!

    • Changed Type NTTLuke Monday, January 12, 2009 8:55 AM
    •  

All Replies

  • Monday, January 12, 2009 9:29 AM
     
     
    Hi Luke,

    see what Christian described in his blog to flatten the wsdl contract into one file without any imports. Maybe this solves your problem.

    Bye,
    Marc

    http://blogoscoped.com/archive/2005-08-24-n14.html
  • Monday, January 12, 2009 2:37 PM
     
     
    I think there was something on this recently in the forum.

    AFAIR the problem was solved by correctly configuring host headers in IIS - not sure about the exact details.

    http://webservices20.blogspot.com/
    WCF Security, Performance And Testing Blog
  • Monday, January 12, 2009 5:34 PM
     
     Proposed Answer
    From what I know about host headers and WCF, what you are trying to do isn't going to work. You would have to have two deployments or....

    Do this:

    1.  use the real name of the server (full domain name)
    2.  modify the firewall to allow connections from both sides and/or build a Midware

    We do this at work and it works, we don't call this "DMZ" but rather "midware" since it technically does sit in the middle of both sides.

    Hope that helps.

    -Keith
    • Proposed As Answer by Marco Zhou Wednesday, January 14, 2009 10:32 AM
    •