Hi Gary,
Regarding on the "A binding instance has already been associated to listen
URI " problem you encountered, here are some of my understanding and
suggestion.
1. For the error message above, it indicate that you're trying to startup
an service host/endponit at a URL which is already occuplied. Based on my
understanding, one possible issue is that you create the WCF class library
via "WCF Service LIbrary" project type. And for this kind of project, it
will use the new "WCFTestclient.exe" for you to debug the WCF class library
when you hit F5 key in vs 2008. (This is a new feature of VS2008 for WCF
service library debugging, you do not need to write a dedicated client app
for test the service library). Here is an article describing this:
#WcfSvcHost and WcfTestClient in VS 2008
http://blogs.msdn.com/knom/archive/2...cftestclient-i
n-vs-2008.aspx
And for your scenario, since the service is already started in IIS6, when
you try hiting F5 to start debugging, the WcfTestClient will try host the
endpont again which result to the error at beginning.
2. When you host your WCF service in IIS, I think the reasonable approach
debugging is as below:
** If your WCF host webapplication and the client application which call it
is in the same solution, you can just start F5 debug in client appliation
project, and you should be able to step from client code into server-side
WCF service code.
** If you want to debug the server-side WCF service code only, then you can
manually use "Debug---Attach Process" to attach the IIS worker process
which host the wcf service. For IIS6, it should be the ASP.NET worker
process (w3wp.exe).
if you have anything unclear on this, please feel free to let me know.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we
can improve the support we provide to you. Please feel free to let my
manager know what you think of
the level of service provided. You can send feedback directly to my manager
at:
ms****@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from
the community or a Microsoft Support Engineer within 2 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. 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/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "GaryDean" <gd**********@newsgroup.nospam>
Subject: Debugging WCF apps
Date: Thu, 6 Nov 2008 09:35:58 -0700
(this was also posted on the MSDN WCF forum but the answers over there are
not so good)
I have a WCF Library hosted by IIS 6 and it all works fine. However I need
to step through the code in the service. But when I hit F5 in VS2008 I get
the following error message. . .
A binding instance has already been associated to listen URI
'http://localhost:8877/VtaxDataService'. If two endpoints want to share the
same ListenUri, they must also share the same binding object instance.
nothing else on my machine is listening on that URI. I thought the message
might be referring to the website hosting my service but I stopped the web
site in IIS and I still get the message. I also stopped IIS and still get
the message My app.config is pasted below.
Why am I getting this message? What is the problem and how can I step
through this code?
Thanks
Gary
<system.serviceModel>
<diagnostics>
<messageLogging logMalformedMessages="true"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true">
<filters>
</filters>
</messageLogging>
</diagnostics>
<services>
<service behaviorConfiguration="VtaxDataService.Service1Beh avior"
name="VtaxDataService.VtaxDataService">
<endpoint address="" binding="wsHttpBinding"
contract="VtaxDataService.IVtaxDataService" />
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange" />
<endpoint binding="basicHttpBinding"
contract="VtaxDataService.IVtaxDataService" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8877/VtaxDataService" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="VtaxDataService.Service1Behavior">
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint
above before deployment -->
<serviceMetadata httpGetEnabled="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="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>