locked
WCF Service - Meta data error RRS feed

  • Question

  • User-1669453032 posted

    Hi,

    i am getting below exception when i am trying to add Service through WCFTestClient.

    Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata.

    c:\Users\mehmood.ahmed\AppData\Local\Temp\Test Client Projects\11.0\42b27fae-5ecd-45c6-969d-978f43c1bbe8\Client.cs(261,26) : error CS0644: 'System.ComponentModel.PropertyChangedEventHandler' cannot derive from special class 'System.MulticastDelegate'
    c:\Users\mehmood.ahmed\AppData\Local\Temp\Test Client Projects\11.0\42b27fae-5ecd-45c6-969d-978f43c1bbe8\Client.cs(24,39) : warning CS0436: The type 'System.ComponentModel.PropertyChangedEventHandler' in 'c:\Users\mehmood.ahmed\AppData\Local\Temp\Test Client Projects\11.0\42b27fae-5ecd-45c6-969d-978f43c1bbe8\Client.cs' conflicts with the imported type 'System.ComponentModel.PropertyChangedEventHandler' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll'. Using the type defined in 'c:\Users\mehmood.ahmed\AppData\Local\Temp\Test Client Projects\11.0\42b27fae-5ecd-45c6-969d-978f43c1bbe8\Client.cs'.
    c:\Users\mehmood.ahmed\AppData\Local\Temp\Test Client Projects\11.0\42b27fae-5ecd-45c6-969d-978f43c1bbe8\Client.cs(53,38) : warning CS0436: The type 'System.ComponentModel.PropertyChangedEventHandler' in 'c:\Users\mehmood.ahmed\AppData\Local\Temp\Test Client Projects\11.0\42b27fae-5ecd-45c6-969d-978f43c1bbe8\Client.cs' conflicts with the imported type 'System.ComponentModel.PropertyChangedEventHandler' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll'. Using the type defined in 'c:\Users\mehmood.ahmed\AppData\Local\Temp\Test Client Projects\11.0\42b27fae-5ecd-45c6-969d-978f43c1bbe8\Client.cs'.
    c:\Users\mehmood.ahmed\AppData\Local\Temp\Test Client Projects\11.0\42b27fae-5ecd-45c6-969d-978f43c1bbe8\Client.cs(165,39) : warning CS0436: The type 'System.ComponentModel.PropertyChangedEventHandler' in 'c:\Users\mehmood.ahmed\AppData\Local\Temp\Test Client Projects\11.0\42b27fae-5ecd-45c6-969d-978f43c1bbe8\Client.cs' conflicts with the imported type 'System.ComponentModel.PropertyChangedEventHandler' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll'. Using the type defined in 'c:\Users\mehmood.ahmed\AppData\Local\Temp\Test Client Projects\11.0\42b27fae-5ecd-45c6-969d-978f43c1bbe8\Client.cs'.
    c:\Users\mehmood.ahmed\AppData\Local\Temp\Test Client Projects\11.0\42b27fae-5ecd-45c6-969d-978f43c1bbe8\Client.cs(188,38) : warning CS0436: The type 'System.ComponentModel.PropertyChangedEventHandler' in 'c:\Users\mehmood.ahmed\AppData\Local\Temp\Test Client Projects\11.0\42b27fae-5ecd-45c6-969d-978f43c1bbe8\Client.cs' conflicts with the imported type 'System.ComponentModel.PropertyChangedEventHandler' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll'. Using the type defined in 'c:\Users\mehmood.ahmed\AppData\Local\Temp\Test Client Projects\11.0\42b27fae-5ecd-45c6-969d-978f43c1bbe8\Client.cs'.

    Monday, March 10, 2014 2:34 AM

Answers

All replies

  • User-1669453032 posted

    and this is my web.config file.

    <?xml version="1.0"?>
    <configuration>
      <connectionStrings>
        <add name="hmis_inventoryConnectionString" connectionString="server=192.168.0.36;User Id=root;password=root;Persist Security Info=True;database=hmis_inventory_hf1;pooling=true;pooling=true;Connection Timeout=10; default command timeout=10000;"
          providerName="MySql.Data.MySqlClient" />
        <add name="hmis_inventory_testConnectionString" connectionString="server=192.168.0.36;User Id=root;password=root;database=hmis_inventory_test"
          providerName="MySql.Data.MySqlClient" />
      </connectionStrings>
      <appSettings>
        <add key="MyConn" value="hmis_inventoryConnectionString" />
        <add key="webpages:Version" value="1.0.0.0" />
        <add key="ClientValidationEnabled" value="true" />
        <add key="UnobtrusiveJavaScriptEnabledwwwwwwwwwww" value="true" />
        <add key="chitPrinter" value="HP LaserJet Basement"/>
      </appSettings>
      <system.web>
        <compilation debug="true" targetFramework="4.0" />
      </system.web>
      <system.serviceModel>
        <services>
          <service name="MagentoCommunicationService.MGCommunicationService"  behaviorConfiguration="ServiceBehaviour">
          </service>     
        </services>
    
          <bindings>
          <basicHttpBinding>
            <binding name="Mage_Api_Model_Server_V2_HandlerBinding"  closeTimeout="00:01:00"
              openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
              allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
              maxBufferPoolSize="524288" maxBufferSize="20000000" maxReceivedMessageSize="20000000"
              textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"
              messageEncoding="Text">
              <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" />
              </security>
            </binding>
    
            <binding name="Mage_Api_Model_Server_V2_HandlerBinding1" closeTimeout="00:01:00"
              openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
              allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
              maxBufferPoolSize="524288" maxBufferSize="20000000" maxReceivedMessageSize="20000000"
              textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"
              messageEncoding="Text">
              <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" />
              </security>
            </binding>
          </basicHttpBinding>
        </bindings>
        <client>
          <endpoint address="http://107.23.41.221/magento_test/index.php/api/v2_soap/index/"
            binding="basicHttpBinding" bindingConfiguration="Mage_Api_Model_Server_V2_HandlerBinding"
            contract="test_ms.Mage_Api_Model_Server_V2_HandlerPortType"
            name="Mage_Api_Model_Server_V2_HandlerPort" />
          <endpoint address="http://192.168.0.31:81/hf/index.php/api/v2_soap/index/?wsdl%2Fmex="
            binding="basicHttpBinding" bindingConfiguration="Mage_Api_Model_Server_V2_HandlerBinding1"
            contract="ms.Mage_Api_Model_Server_V2_HandlerPortType" name="Mage_Api_Model_Server_V2_HandlerPort1" />
        </client>
        <behaviors>
          <serviceBehaviors>
            <behavior name="ServiceBehaviour">
              <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="true"/>
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
      </system.serviceModel>
     <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
      </system.webServer>
      
    </configuration>
    

    Monday, March 10, 2014 2:35 AM
  • User-1623675128 posted

    definetely you are seems to be missing Mex endpoint..

    refer this

    http://stackoverflow.com/questions/5199541/failed-to-add-a-service-service-metadata-may-not-be-accessible-make-sure-your

    <

    endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex"

    />

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 10, 2014 3:06 AM