CustomBinding in WCF using Configuration File - VB.NET

Hi,

Can you please let me know in simple terms:

CustomBinding in WCF using Configuration File - VB.NET

Please provide Host configuration file, Client configuration file & code !

Thanks
milani_lucieAsked:
Who is Participating?
 
guveraCommented:
Hi lucie,
 
The below link have an article about custom binding in WCF using Configuration file.

http://www.dotnetfunda.com/articles/article1047-how-to-create-custom-binding-in-wcf-services-.aspx

Also please check the  Sample Code to manage app.config
 Dim strConfig As String
 strConfig = System.Reflection.Assembly.GetExecutingAssembly().
CodeBase.Replace("file:///", "") + ".config"
 Dim doc As XmlDocument = New System.Xml.XmlDocument()
doc.Load(strConfig)'
 Get Node value
MessageBox.Show(doc.SelectSingleNode("descendant::
appSettings/add[@key='ConnectionString']").
Attributes("value").Value())
' Update Node value
doc.SelectSingleNode("descendant::appSettings/
add[@key='ConnectionString']").Attributes("value").Value
= "This is new connection string"

Regards
Guvera
0
 
milani_lucieAuthor Commented:
Hi Guvera

Can you please explain these two tags -  <httpTransport />  and  <textMessageEncoding /> ?

<bindings>
                <customBinding>
                                          <binding name=”custombinding”>
                                                                    <httpTransport />
                                                                    <textMessageEncoding />
                                           <binding>
                       </customBinding>
</bindings>

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.