Note that there are some explanatory texts on larger screens.

plurals
  1. POwcf service wsHttpBinding over internet
    primarykey
    data
    text
    <p>Hello trying to get my binding to work over internet. im using wsHttpBinding and trying to get it to work with soap. i've tried NetTcpBinding and got my functions to show in the wcftestclient over the internet with my public ip and forwared my port to the right computer, but i could not call any functions failing with: <img src="https://i.stack.imgur.com/HTDck.jpg" alt="enter image description here"></p> <p>and i dont think soap can be used with NetTcpBinding so i've been trying to make this config work </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;configuration&gt; &lt;system.serviceModel&gt; &lt;services&gt; &lt;service behaviorConfiguration="VenatoWCF.Behavior" name="VenatoWCF.WCFService"&gt; &lt;endpoint address="" binding="wsHttpBinding" contract="VenatoWCF.IService" bindingConfiguration="Binding"&gt; &lt;/endpoint&gt; &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"&gt; &lt;/endpoint&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress="http://localhost:8734/WCF/" /&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="VenatoWCF.Behavior"&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;useRequestHeadersForMetadataAddress /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;bindings&gt; &lt;wsHttpBinding&gt; &lt;binding name="Binding" &gt; &lt;security mode="Message"&gt; &lt;transport clientCredentialType="None"/&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/wsHttpBinding&gt; &lt;/bindings&gt; &lt;/system.serviceModel&gt; &lt;startup&gt; &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/&gt; &lt;/startup&gt; &lt;/configuration&gt; </code></pre> <p>this can be consumed by soap but this this config i cant get any respone with soap or wcftestclient.</p> <p>soap: Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from '<a href="http://(My" rel="nofollow noreferrer">http://(My</a> External ip):8734/WCF/?wsdl' : failed to load external entity "<a href="http://(My" rel="nofollow noreferrer">http://(My</a> External ip):8734/WCF/?wsdl"</p> <p>thank you for answers</p> <p>EDIT1 sorry wrong config file for thoose who where fast enough to see :/</p> <p>EDIT2</p> <p>found in my wsdl file that in the bottom i have <code>&lt;soap:address location="https://dendei:8734/WCF/" /&gt;</code> isent that one supposed to be the one soap connects too and need to be <code>"https://(my external ip):8734/WCF/"</code> ???</p> <p>how can i change this one? in config file? or in my program?</p> <p>EDIT3</p> <p>stumbled on this site while searching <a href="http://msdn.microsoft.com/en-us/library/System.ServiceModel.Description.UseRequestHeadersForMetadataAddressBehavior.aspx" rel="nofollow noreferrer">UseRequestHeadersForMetadataAddressBehavior</a></p> <p>and that solved it localy so i could have localhost in my baseaddress <code>&lt;add baseAddress="https://localhost:8734/WCF/"/&gt;</code></p> <p>and it worked with soap so i got back the address it tries to connect too</p> <p>and worked over the net :)</p> <p>but with UseRequestHeadersForMetadataAddressBehavior you have to use .NET 4.0</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload