WCF, net.Tcp, baseAddress

G

Guest

Hello,

I have an odd problem with a windows service host - both as a console app
and a windows service (installed and uninstalled using installutil)

For some reason if I only use the baseAddress I'll get an
AddressAlreadyInUseException on the service.Open command.

If I specify a different address in the EndPoint or if I remove the
app.config endpoint/baseAddress and do it through code it works fine.

If I do a netstat there are no ports in a listening state until the Open
command is executed.

Is there a known issue with the baseAddress trying to assign a port twice on
the Open command?

This wasn't an issue until I uninstalled the windows service and ran the app
as a console app again (and for that matter a windows service). The service
was removed using installutil /u and I did restart my machine. Is there some
lingering settings somewhere that may not be uninstalled?

thanks,
 
S

Steven Cheng[MSFT]

Hi Duffman,

So the address binding problem also occur when you launch the WCF program
code as a normal console application(do not host it as windows service)?
If you're using the configuration file to specify the baseAddress and
endpoint address ,woudl you provide the configuration snippet on how to
specify the base and endpoint address?

Generally, if you have supply a base address in service configuration and
other endpoint's Address will derive from the base address , you should put
only relative address for the endpoint. e.g.

baseAddress="http://localhost/myservice"

endpoint Address = "endpoint1"(rather than
http://localhost/myservice/endpoint1)
endpoint Address = "endpoint2"(rather than
http://localhost/myservice/endpoint2)

is this also what you do currently?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top