Click here to Skip to main content
15,905,322 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have used your application and its awesome.
it worked properly but when i import your complete project into my project then Client side started giving error about "no end point" but Host is working properly.what to do with Client??
Posted
Updated 18-Apr-12 0:03am
v3
Comments
Leonardo Junior 18-Apr-12 8:51am    
You check in Web.config of the client if contains a endpoint configuration?
mane0806 18-Apr-12 13:57pm    
@Leonardo Junior
//from here i downloaded that chat app and see my app.config file in solution 2
http://www.codeproject.com/Articles/25261/A-WCF-WPF-Chat-Application
santhoshnani 6-Dec-12 3:49am    
i have used your application but i am getting error like Could not find default endpoint element that references contract 'IChat' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
santhoshnani 6-Dec-12 7:02am    
i am using wcf restfull service in my chat application and i want callback in my service .how can i implement my service and how can i implement chat application without chat room

Your client must contain a same code in your Web.config or App.config:

<system.servicemodel>
    <bindings>
      <basichttpbinding>
        <binding name="basicHttpEndPointConfiguration" closetimeout="00:01:00">
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          allowCookies="false" bypassProxyOnLocal="false"                   hostNameComparisonMode="StrongWildcard"
          maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerquotas maxdepth="32" maxstringcontentlength="8192" maxarraylength="16384">
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientcredentialtype="None" proxycredentialtype="None">
              realm="" />
            <message clientcredentialtype="UserName" algorithmsuite="Default" />
          </transport></security>
        </readerquotas></binding>
      </basichttpbinding>
    </bindings>
    <client>
      <endpoint address="http://localhost/YourService.svc">
        binding="basicHttpBinding" bindingConfiguration="basicHttpEndPointConfiguration"
        contract="WCF.IYourService" name="basicHttpEndPointConfiguration" />
    </endpoint></client>
  </system.servicemodel>
 
Share this answer
 
// wcf-wpf client-host project run properly but when i imported this project //into my own small project then client stopped working and give exception.
" Could not find default endpoint element that references contract 'SVC.IChat' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element. "

/// this how my app.config file is:


XML
 <configuration>
    <system.servicemodel>
        <bindings>
            <nettcpbinding>
                <binding name="NetTcpBinding_IChat" closetimeout="00:01:00" opentimeout="00:01:00">
                    receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false"
                    transferMode="Buffered" transactionProtocol="OleTransactions"
                    hostNameComparisonMode="StrongWildcard" listenBacklog="10"
                    maxBufferPoolSize="67108864" maxBufferSize="67108864" maxConnections="100"
                    maxReceivedMessageSize="67108864">
                    <readerquotas maxdepth="32" maxstringcontentlength="67108864" maxarraylength="67108864">
                        maxBytesPerRead="67108864" maxNameTableCharCount="16384" />
                    <reliablesession ordered="true" inactivitytimeout="20:00:10">
                        enabled="true" />
                    <security mode="None">
                        <transport clientcredentialtype="Windows" protectionlevel="EncryptAndSign" />
                        <message clientcredentialtype="Windows" />
                    </security>
                </reliablesession></readerquotas></binding>
            </nettcpbinding>
        </bindings>
        <client>
            <endpoint address="net.tcp://localhost:7997/WPFHost/tcp" binding="netTcpBinding">
                bindingConfiguration="NetTcpBinding_IChat" contract="SVC.IChat"
                name="NetTcpBinding_IChat" />
        </endpoint></client>
    </system.servicemodel>
</configuration>
 
Share this answer
 
v2
Comments
Leonardo Junior 19-Apr-12 11:37am    
Ok, Understand.

In this example your endpoint configuration is same of this:

client
endpoint address=""
binding="nettcpBinding" bindingConfiguration="NetTcpBinding_IChat"
contract="WCF.IYourService"/>
/endpoint
/client
mane0806 19-Apr-12 12:53pm    
<pre lang="HTML">
client
endpoint address="net.tcp://localhost:7997/WPFHost/tcp" binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_IChat" contract="SVC.IChat"
name="NetTcpBinding_IChat" name="NetTcpBinding_IChat"/>
/client></pre>

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