Hi Frank,
From your description, you are developing an WCF service and a client
through VS 2008. The service used to use wshttpbinding, and when you switch
it to netTcpBinding and regenerate the service reference at client, you
found the client generate two configuration section for the service
endpoint , correct?
Based on my experience, such behavior might occur at the following
situation:
* you have an WCF service endpoint using certain configuration(b inding and
behavior ...)
* you change its binding or other settings
* without remove the original client service reference(proxy class) in
client project, you directly update the reference, it might keep the
original reference setting and generate a new client endpoint entry.
Therefore for this issue, I suggest you always first remove the existing
client-side service reference(in solution explorer), this will make the IDE
remove the proxy class and also clear the app.config file. Then, add the
"service reference" again in the project.
For the second issue you mentioned:
=============== ======
but the name and
bindingConfigur ation have the suffix "1" . Additional VS2008
creates this entry:
<identity>
<userPrincipalN ame value="Domain\U sername" />
</identity>
=============== ==========
based on the document you can see that this element <identityis used to
set a predefined identiy for the expected server-side service(not for
client):
#<identity>
http://msdn.microsoft.com/en-us/library/ms731721.aspx
Therefore, it is generated by the IDE according to the server-side
service's identity. By default when using netTCPBinding, WCF service
endpoint will use windows authentication and if you are using the VS IDE
test server(instead of IIS), the service's running process identity is the
current logon user(that should be the "domain\usernam e" for your case. You
can manually specify another expected identity(but the default one is ok).
Or if you do not need security feature for the current case, you can turn
it off in your service configuration( in the NetTcpBinding configuration):
For example:
=============== ===============
<system.service Model>
<services>
<service behaviorConfigu ration="WCFIDES vr.TestServiceB ehavior"
.............
<endpoint address="net.Tc p://localhost:8989/TestService"
binding="netTcp Binding"
bindingConfigur ation="TSBindin g"
contract="WCFID ESvr.ITestServi ce">
</endpoint>
............... .......
</service>
</services>
<bindings>
<netTcpBindin g>
<binding name="TSBinding " >
<!-- i turn off the security here -->
<security mode="None" >
<transport clientCredentia lType="None"/>
<message clientCredentia lType="None"/>
</security>
</binding>
</netTcpBinding>
</bindings>
=============== =============== ==
You can get more about the WCF configuration schema info here:
#Windows Communication Foundation Configuration Schema
http://msdn.microsoft.com/en-us/library/ms731734.aspx
and for WCF security programming:
#Windows Communication Foundation Security
http://msdn.microsoft.com/en-us/library/ms732362.aspx
If there is anything unclear, please feel free to post here.
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****@microsof t.com.
=============== =============== =============== =====
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.
--------------------
Date: Wed, 23 Jul 2008 19:52:42 +0200
From: Frank Hauptlorenz <ec***********@ nospam.nospam>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Subject: VS2008 creates a 2nd endpoint when actualising a web reference
Hello out there,
I changed an existing and good working webservice from an wsHttpBinding
to an NetTcpBinding.
This is working (after trying some time) and has real a better performance!
But one thing is strange: when I'm now actualising the web reference
from within VS2008, VS2008
creates a 2nd endpoint config in my app.conf.
The endpoint is exactly the same as the existing but the name and
bindingConfigur ation have the suffix "1" . Additional VS2008
creates this entry:
<identity>
<userPrincipalN ame value="Domain\U sername" />
</identity>
Where Domain\Username is my username in the domain.
The client does not run with these informations, I have to remove them
manually.
What's wrong with VS2008?
Thank you,
Frank