troubleshooting Question

Read App.Config file for EndPointAddress in WCF

Avatar of milani_lucie
milani_lucieFlag for United States of America asked on
Visual Basic.NETWCF
3 Comments1 Solution7631 ViewsLast Modified:

I have the following App.config file in my client application. I need to read the EndpointAddress based on Endpoint name. Can you please provide me code how to do that ?


<?xml version="1.0" encoding="utf-8"?>
                        <binding name="BasicHttpBinding_IAdd" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                              <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                              <security mode="None">
                                    <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                                    <message clientCredentialType="UserName" algorithmSuite="Default" />
                  <endpoint address="http://localhost:8081/AddClass" binding="basicHttpBinding"
                bindingConfiguration="BasicHttpBinding_IAdd" contract="IAdd"
                name="BasicHttpBinding_IAdd" />


Dim EndpointAddress As New System.ServiceModel.EndpointAddress(GetEndpointAddress("BasicHttpBinding_IAdd"))

Please provide code for "GetEndpointAddress" function.

Aaron Jabamani
Technical Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros