Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Wed, 2 Jul 2008 12:47:39 +0200,    group: microsoft.public.dotnet.framework.webservices        back       


WCF with NAT   
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/ShowPost.aspx?PostID=423623&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
date: Wed, 2 Jul 2008 12:47:39 +0200   author:   Berto hertzianremoveThis@libero.it

Re: WCF with NAT   
There was an error in my static WSDL (in manual change). Now it works, but 
not using automatic wsdl generated by .svc service.
There's some workaround to use automatic wsdl generation specifing a custom 
location??
Thx
Massimo
date: Wed, 2 Jul 2008 14:56:26 +0200   author:   Berto hertzianremoveThis@libero.it

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us