Click here to Skip to main content
15,908,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I Want to host two WCF Services in Windows Forms Application And Client For Services is a web based application where i want to implement transactions, the below binding was giving errors

HTML
 <services>
            <service name="TransService1.Service1">
                <endpoint address="" binding="wsHttpBinding" bindingConfiguration=""
                    contract="TransService1.IService1">
                    <identity>
                        <dns value="localhost" />
                    </identity>
                </endpoint>
<endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
                    name="firstservice" contract="IMetadataExchange" />
                <host>
                    <baseAddresses>
                        <add baseAddress="net.tcp://localhost:2893/TransService1/Service1" />
               </baseAddresses>
                </host>
            </service>
            <service name="TransService1.Service2">
                <endpoint address="" binding="wsHttpBinding" bindingConfiguration=""
                    contract="TransService1.IService2">
                    <identity>
                        <dns value="localhost" />
                    </identity>
                </endpoint>
                <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
                    name="secondservice" contract="IMetadataExchange" />
   <host>
                    <baseAddresses>
                        <add baseAddress="net.tcp://localhost:5689/TransService1/Service2" />
                    </baseAddresses>
                </host>
            </service>
        </services>



I'm Getting the below error

Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding. Registered base address schemes are [net.tcp].
Posted
Updated 28-Jul-13 21:11pm
v2
Comments
idenizeni 1-Aug-13 17:34pm    
A complete guess as I am in the process of trying to learn WCF and admittedly know little more than the information in the first MS tutorial...

What if you add a baseaddess to the baseaddresses element like so...

baseaddress="http://localhost:2893/TransService1/Service1"

... the only difference being 'http'.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900