नहीं ढूंढ सकता है मैं सिर्फ डब्ल्यूसीएफ सीख रहा हूं और वर्तमान में इसे अभी तक प्राप्त कर रहा हूं।डब्ल्यूसीएफ सेवा होस्ट किसी भी सेवा मेटाडाटा
सीएस फ़ाइल:
WCF service host cannot find any service metadata...
किसी भी विचार यह क्या हो सकता है:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
namespace wcfLib
{
[ServiceContract]
public interface IfaceService
{
[OperationContract]
int wordLen(string word);
}
public class StockService : IfaceService
{
public int wordLen(string word)
{
return word.Length;
}
}
}
फिर भी जब मैं इसे चलाने के लिए कोशिश कर रहा हूँ, यह एक त्रुटि पॉप?
कॉन्फ़िग फ़ाइल:
<system.serviceModel>
<services>
<service behaviorConfiguration="wcfLib.Service1Behavior" name="wcfLib.Service1">
<endpoint address="" binding="wsHttpBinding" contract="wcfLib.ser">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8732/Design_Time_Addresses/wcfLib/Service1/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="wcfLib.Service1Behavior">
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
आप हमें अपनी ** config ** फाइल दिखाने की जरूरत है! मेटाडेटा एक्सचेंज की तरह सामग्री को कॉन्फ़िगर –
में परिभाषित किया गया है और आप अपना मेटाडेटा प्राप्त करने के लिए किस यूआरएल से कनेक्ट करने का प्रयास करते हैं ?? आप इस सेवा को कैसे होस्ट कर रहे हैं - आईआईएस या स्वयं-होस्टिंग ?? –
Yoru कोड और कॉन्फ़िगरेशन मेल नहीं खाता - कोड में आपकी सेवा 'wcfLib.StockService' है लेकिन आपके टैग में 'name = wcfLib.Service1' है - उन नामों से मिलान करने की आवश्यकता है! एंड्रॉइंट पर 'अनुबंध = "wcfLib.ser" विशेषता के साथ ही - नामस्थान + इंटरफ़ेस नाम से मिलान करने की आवश्यकता है! ('wcfLib.IfaceService') –