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="webHtt pBinding"
bindingConfigur ation="httpsBin ding" contract="IServ ice">
<endpoint address="mex" binding="mexHtt psBinding"
contract="IMeta dataExchange" />
with this binding configuration for use https transport
<basicHttpBindi ng>
<binding name="httpsBind ing">
<security mode="Transport "></security>
</binding>
</basicHttpBindin g>
and the behaviour for metadata is
<serviceMetadat a httpsGetEnabled ="true" />
with this configuration WSDL is located on
https://LocalServerName/..../Service.svc (that is not correct).
I've tried to configurare serviceMetadata with
externalMetadat aLocation="http s://PUBLICIP/LocalServiceNam e/.../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>
<serviceBehavio rs>
<behavior name="CallRouti ngBehavior">
<serviceMetadat a httpsGetEnabled ="true"
externalMetadat aLocation="http s://vconsole.virtua lpbx.com/callrouting/callrouting.wsd l"/>
</behavior>
</serviceBehavior s>
</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
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="webHtt pBinding"
bindingConfigur ation="httpsBin ding" contract="IServ ice">
<endpoint address="mex" binding="mexHtt psBinding"
contract="IMeta dataExchange" />
with this binding configuration for use https transport
<basicHttpBindi ng>
<binding name="httpsBind ing">
<security mode="Transport "></security>
</binding>
</basicHttpBindin g>
and the behaviour for metadata is
<serviceMetadat a httpsGetEnabled ="true" />
with this configuration WSDL is located on
https://LocalServerName/..../Service.svc (that is not correct).
I've tried to configurare serviceMetadata with
externalMetadat aLocation="http s://PUBLICIP/LocalServiceNam e/.../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>
<serviceBehavio rs>
<behavior name="CallRouti ngBehavior">
<serviceMetadat a httpsGetEnabled ="true"
externalMetadat aLocation="http s://vconsole.virtua lpbx.com/callrouting/callrouting.wsd l"/>
</behavior>
</serviceBehavior s>
</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
Comment