The contract name 'IMyService' could not be found in the list of contracts implemented by the service 'MyService'.. ---> System.InvalidOperationException: The contract name 'IMyService' could not be found in the list of contracts implemented by the service 'MyService'.डब्ल्यूसीएफ अनुबंध नाम 'IMyService' नहीं मिला?
यह मुझे पागल कर रहा है। मेरे पास एक डब्ल्यूसीएफ वेब सेवा है जो मेरी देव मशीन पर काम करती है, लेकिन जब मैं इसे वर्चुअल मशीन पर कॉपी करता हूं जिसे मैं परीक्षण के लिए उपयोग कर रहा हूं, तो मुझे यह त्रुटि मिलती है जो इंगित करता है कि मैं इंटरफ़ेस को कार्यान्वित नहीं कर रहा हूं, लेकिन यह नहीं करता है समझ में आता है क्योंकि सेवा मेरी विंडोज़ XP आईआईएस पर काम करती है। वर्चुअल मशीन विंडोज सर्वर 2003 आईआईएस का उपयोग करता है। कोई विचार?
यहां ध्यान देने योग्य एक बात यह है कि क्लाइंट के रूप में वेब ब्राउज़र में सेवा तक पहुंचने का प्रयास करते समय भी मुझे यह त्रुटि मेरे वीएम पर मिलती है।
नोट: मैं प्रिंसिपल प्रिमिशनमोड = "यूज विन्डोज समूह" का उपयोग कर रहा हूं, लेकिन यह मेरी स्थानीय मशीन पर कोई समस्या नहीं है। मैं बस खुद को उपयुक्त विंडोज समूह में जोड़ता हूं। लेकिन मेरे वीएम पर कोई भाग्य नहीं है।
कॉन्फ़िग:
<configuration>
<system.serviceModel>
<diagnostics>
<messageLogging logEntireMessage="false" maxSizeOfMessageToLog="2147483647" />
</diagnostics>
<services>
<service behaviorConfiguration="MyServiceBehaviors" name="MyService">
<endpoint binding="basicHttpBinding" bindingConfiguration="basicHttpBinding"
name="MyService" bindingName="basicHttpBinding" bindingNamespace="http://my.test.com"
contract="IMyService">
</endpoint>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBinding" maxReceivedMessageSize="2147483647">
<readerQuotas maxStringContentLength="2147483647" />
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="None" />
</security>
</binding>
</basicHttpBinding>
<netTcpBinding>
<binding name="WindowsClientOverTcp" maxReceivedMessageSize="2147483647">
<readerQuotas maxStringContentLength="2147483647" />
</binding>
</netTcpBinding>
<wsHttpBinding>
<binding name="wsHttpBinding" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647"
maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehaviors">
<serviceMetadata httpGetEnabled="true" />
<serviceAuthorization principalPermissionMode="UseWindowsGroups"
impersonateCallerForAllOperations="false" />
<serviceCredentials />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
क्या इंटरफ़ेस के साथ असेंबली एप्लिकेशन के लिए दृश्यमान है? साथ ही, क्या आपने कॉन्फ़िगरेशन फ़ाइल में इंटरफ़ेस नाम के हिस्से के रूप में नामस्थान निर्दिष्ट किया था? – casperOne