Watch Pre-recorded Live Shows Here
Why Join
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
A P
2.1k
10
589
Pass EndpointAddress to ChannelFactory with EndPointConfigName
Sep 25 2020 6:09 PM
For some scenarios, I want to pass the endpoint address to my Channel Factory. But want to use the app config address in other situations.
My Code:
if
(endPointAddress !=
null
&& endPointAddress !=
string
.Empty)
channelFactory =
new
ChannelFactory<T>(clientEndpointName,
new
EndpointAddress(endPointAddress));
else
channelFactory =
new
ChannelFactory<T>(clientEndpointName);
When endpoint address is passed (eg: net.tcp://123.4.56.7:9049/Adapter1)
It gives me an error
Dispatch transaction request failed. ---> System.ServiceModel.Security.MessageSecurityException: Identity check failed for outgoing message. The expected DNS identity of the remote endpoint was '123.4.56.7' but the remote endpoint provided DNS claim XXXXX. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity XXXXX as the Identity property of EndpointAddress when creating channel proxy.
Screenshot of App config:
Any help is appreciated.
Reply
Answers (
2
)
Unable to serialize while using Encoding as DataMember in WCF services
How to bind data in view model using telerik radcalender