none
Self Hosted in Windows Executable(Works in Debug): A Registration Already Exists For URI RRS feed

  • Question

  • I just don't understand why it saying that there is a registration already.  Here is my configuration.  I have been searching around for two days and can not find an answer to this.  Any help is welcomed.  Thank you in advance.

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <startup>
            <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
        </startup>
      <system.serviceModel>
        <services>
          <service name="Gov.Dva.Ogc.Data.Sys.Service.Wcf.SysService">
            <endpoint address="tcpBinding" binding="netTcpBinding" contract="Gov.Dva.Ogc.Data.Sys.Service.Wcf.ISysService"/>
            <host>
              <baseAddresses>
                <add baseAddress="net.tcp://localhost:8733/Gov.Dva.Ogc.Data.Sys.Service.Wcf/SysService/" />
              </baseAddresses>
            </host>
          </service>
        </services>
        <behaviors>
          <serviceBehaviors>
            <behavior>
              <serviceDebug includeExceptionDetailInFaults="True" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>
    </configuration>


    Michael Stevens

    Thursday, July 10, 2014 2:28 PM

Answers

  • Hi,

    First please try to add the mex endpoint and enable the serviceMetadata as following, or the service will not work.

     <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"/>
       
        <behaviors>
          <serviceBehaviors>
            <behavior>
              <serviceMetadata/>//please do not forget to add this line
    <serviceDebug includeExceptionDetailInFaults="True" />
           </behavior>
          </serviceBehaviors>

    Then also please make sure that your URI or the port number(8733) is not used by some other process at the same time.

    Besides, in WCF we can try to enable the wcf tracing to help find the more detailed error information.

    The following configuration taken from MSDN can be applied to enable tracing on your WCF service.

    <configuration>
      <system.diagnostics>
        <sources>
          <source name="System.ServiceModel"
                  switchValue="Information, ActivityTracing"
                  propagateActivity="true" >
            <listeners>
                 <add name="xml"/>
            </listeners>
          </source>
          <source name="System.ServiceModel.MessageLogging">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
          <source name="myUserTraceSource"
                  switchValue="Information, ActivityTracing">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
        </sources>
        <sharedListeners>
            <add name="xml"
                 type="System.Diagnostics.XmlWriterTraceListener"
                 initializeData="Error.svclog" />
        </sharedListeners>
      </system.diagnostics>
    </configuration>

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, July 11, 2014 5:11 AM
    Moderator