Hi Scott,
From your description ,I understand you want to convert a .NET remoting
service to WCF hosted. However, you met some problems on converting a
singleton SAO since it uses dynamically assigned listening port, so you're
wondering how to do this in WCF, correct?
If your main concern is dynamically configuring service port. I think you
can consider do the ServceHost creation programmatically. Thus, you can use
code to specify the baseAddress or subaddress for each endpoint of the
service.
I've found two web articles which provide some sample code on creating WCF
service host programmtically. They also include the code that supplyl the
service's address(include port)
#Adding a WCF MetaData EndPoint programmatically
http://www.west-wind.com/WebLog/posts/9323.aspx
#Creating WCF Service Host Programmatically
http://geekswithblogs.net/hinshelm/a...-WCF-Service-H
ost-Programmatically.aspx
Hope this helps some.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: =?Utf-8?B?U2NvdHQ=?= <sn******@newsgroups.nospam>
Subject: HttpChannel in WCF
Date: Fri, 11 Jan 2008 06:27:00 -0800
I have a small program that exposes an interface via soap as follows:
HttpChannel ipc = new HttpChannel( nPort );
ChannelServices.RegisterChannel( ipc, false );
RemotingConfiguration.RegisterWellKnownServiceType (
typeof(WsdlClient.CJLResponse), "JLSoapResponse.rem",
WellKnownObjectMode.Singleton );
This works fine. Note that the port the program is listening on varies.
This
allows for multiple instances of the program to run concurrently.
I want to convert this to its WCF equivalent.
I am current using the following configuration which works for a single
instance but not for multiple.
<system.serviceModel>
<services>
<service name="WsdlClient.CJLResponse"
behaviorConfiguration="SoapRspService">
<host>
<baseAddresses>
<add baseAddress="http://xx.xx.xx.xx:5300/JLSoapResponse.wcf"/>
</baseAddresses>
</host>
<endpoint address=""
binding="basicHttpBinding"
bindingConfiguration="SoapRspBindingBasicHttp"
contract="JLSoapCommon.IJLSoapResponse" />
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="SoapRspBindingBasicHttp"
maxReceivedMessageSize="65536">
<readerQuotas maxStringContentLength="65536"/>
<security mode="None">
<transport clientCredentialType="None" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="SoapRspService">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<diagnostics>
<messageLogging logEntireMessage="true"
logMalformedMessages="true"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true"
maxMessagesToLog="100">
</messageLogging>
</diagnostics>
</system.serviceModel>
--
Scott