Hi everyone,
I have a problem with WCF configuration. IIS server, that contains my wcf
(web) service, is in a private network with a rule in firewall configuration
that forwards https port on internet. The address of server in the private
network is different from the public ip of internet. The WSDL automatically
generated by IIS server user the local address (local name of server), not
valid for internet (there is a gateway in the middle with firewall and port
forwaring). How can I configure this service (Web.config or IIS
configuration) to generate WSDL and connected XSD in a specific location
(public ip)???
My actual configuration is:
for endpoints...
<endpoint address="" binding="webHttpBinding"
bindingConfiguration="httpsBinding" contract="IService">
<endpoint address="mex" binding="mexHttpsBinding"
contract="IMetadataExchange" />
with this binding configuration for use https transport
<basicHttpBinding>
<binding name="httpsBinding">
<security mode="Transport"></security>
</binding>
</basicHttpBinding>
and the behaviour for metadata is
<serviceMetadata httpsGetEnabled="true" />
with this configuration WSDL is located on
https://LocalServerName/..../Service.svc (that is not correct).
I've tried to configurare serviceMetadata with
externalMetadataLocation="https://PUBLICIP/LocalServiceName/.../Service.wsdl,
where Service.wsdl (and all connected XSD) is a static wsdl created by
automatic procedure and changed manually with PUBLICIP, using this
procedure, find on internet
(http://forums.microsoft.com/MSDN/Sho...23623&SiteID=1)
---------------------------------------------
1) Produce the wsdl in the browser and save to file (by hitting .svc?wsdl
from browser)
2) Produce the xsd files by hitting url from wsdl (xsd=xsd0, etc), and save
to file from browser
3) replace all machine name references from wsdl with domain name (or ip
address) and change xsd references and save
4) replace all machine name references from xsd files with domain name (or
ip address)
5) make sure to name xsd file with .xsd extension (ie, name_0.xsd,
name_1.xsd)
6) copy wsdl and xsd file(s) to virtual directory
7) add the following entry in your web.config file:
<behaviors>
<serviceBehaviors>
<behavior name="CallRoutingBehavior">
<serviceMetadata httpsGetEnabled="true"
externalMetadataLocation="https://vconsole.virtualpbx.com/callrouting/callrouting.wsdl"/>
</behavior>
</serviceBehaviors>
</behaviors>
--------------------------------------------
When I import this wsdl on client, there are no errors but the client stub
and configuration (in app.config) will not be generated. Locally, on my
developping machine, all works.
There is a solution for this problem???
Thank you
Massimo