c# - Can't add WCF service reference to client project using netTcpBinding -


I have a WCF service that uses nettip binding and I want to host it in a WPF application. The service starts correctly, but when I try to get metadata using Visual Studio Add 'Service Reference', I get this exception:

  URI prefix There is no reference to the metadata that can not be solved: 'net.tcp: // localhost: 8000 / mandreck / max'  

App of my service project .config file:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Configuration & gt; & Lt; AppSettings & gt; & Lt; Add key = "aspnet: UseTaskFriendlySynchronizationContext" value = "true" /> & Lt; / AppSettings & gt; & Lt; System.web & gt; & Lt; Compilation debug = "true" /> & Lt; /system.web> & Lt; System.serviceModel & gt; & Lt; Services & gt; & Lt; Service name = "Mandrake Services. Ot Evers Service" & gt; & Lt; Endpoint address = "OTService" binding = "net TCPbinding" contract = "Mandrake service. IotAware service" & gt; & Lt; Identity & gt; & Lt; Dns value = "localhost" /> & Lt; / Identification & gt; & Lt; / Endpoint & gt; & Lt; Endpoint Names name = "MEX" address = "MEX" binding = "MAXPACKBING" contract = "IMATAdataXchange" / & gt; & Lt; Host & gt; & Lt; BaseAddresses & gt; & Lt; BaseAddress = "net.tcp: // Add localhost: 8000 / Mandrak /" / gt; & Lt; / BaseAddresses & gt; & Lt; / Host & gt; & Lt; / Services & gt; & Lt; / Services & gt; & Lt; Behavior & gt; & Lt; ServiceBehaviors & gt; & Lt; Behavior & gt; & Lt; ServiceMetadata / & gt; & Lt; Service debug includes ExceptionDetailInFaults = "False" /> & Lt; / Behavior & gt; & Lt; / ServiceBehaviors & gt; & Lt; / Behavior & gt; & Lt; /system.serviceModel> & Lt; / Configuration & gt;  

and the code in the hosting app:

  Uri bassadder = new Uri ("net.tcp: // localhost: 8000 / Mandrake"); Service host host = new service host (typef (OTadware service), base address); Try {Host.AddServiceEndpoint (typeof (IOTAwareService), New NetTcpBinding (), "OTService"); } Catch (Communication Expression E) {console.lightline (E. message); Host.Abort (); }  

To solve this problem I was mainly about to add 'Setmetatata' or provide Max Endpoint in the service config. Can you give some suggestions?

Edit:

Last Config:

  & lt; System.serviceModel & gt; & Lt; Behavior & gt; & Lt; ServiceBehaviors & gt; & Lt; Behavior name = "newbie day 0" & gt; & Lt; Service tax data / & gt; & Lt; Service debug includes ExceptionDetailInFaults = "True" /> & Lt; / Behavior & gt; & Lt; / ServiceBehaviors & gt; & Lt; / Behavior & gt; & Lt; Services & gt; & Lt; Service name = "Mandrake Services .otware service" transaction support = "Newbewar 0" & gt; & Lt; Host & gt; & Lt; BaseAddresses & gt; & Lt; AddAddress = "net.tcp: // localhost: 8036 / ots service" /> & Lt; / BaseAddresses & gt; & Lt; / Host & gt; & Lt; Endpoint address = "binding =" net TCP binding "name =" TCPandpoint "contract =" Mandrake. Service. IotAware Service "/> Endpoint address =" mex "binding =" maxCPCPbing "name =" metadataindpoint "contract =" imadadataexchange "/>   

Hosting Application:

  host = new service host (typef After enabling the service, I have managed to understand it. Debug includes expenditure definitions, it was pretty obvious.  
  Mandrake Service.IotCalback.Response refers to a message element [http://tempuri.org/:Send] which has already been exported from the handrach. Service. IotaWiresServices Operated Operation  

So there was an OTMessage operation in the service contract and in the callback interface. It was an ugly mistake, but I thought I would leave the solution here, because it helps someone.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -