title: How to add Application name to <appSettings/>?
body: <p>This is my app.config file looks like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
      &lt;appSettings&gt;
        &lt;add key="Application Name" value="/MyApplication" /&gt;
      &lt;/appSettings&gt;
    &lt;connectionStrings&gt;
       &lt;add name="frmStartup.My.MySettings.HDIMembershipProviderConnectionString"
          connectionString="Data Source=.\sqlexpress;Initial Catalog=HDIMembershipProvider;Integrated Security=True"
          providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
    &lt;system.web&gt;
      &lt;membership defaultProvider="HDIMembershipProvider"&gt;
        &lt;providers&gt;
          &lt;clear/&gt;
          &lt;add name="HDIMembershipProvider" type="MyApplication.HDIMembershipProvider, MyApplication"/&gt;
        &lt;/providers&gt;
      &lt;/membership&gt;
    &lt;/system.web&gt;
      &lt;system.diagnostics&gt;
          &lt;sources&gt;
              &lt;!-- This section defines the logging configuration for My.Application.Log --&gt;
              &lt;source name="DefaultSource" switchName="DefaultSwitch"&gt;
                  &lt;listeners&gt;
                      &lt;add name="FileLog"/&gt;
                      &lt;!-- Uncomment the below section to write to the Application Event Log --&gt;
                      &lt;!--&lt;add name="EventLog"/&gt;--&gt;
                  &lt;/listeners&gt;
              &lt;/source&gt;
          &lt;/sources&gt;
          &lt;switches&gt;
              &lt;add name="DefaultSwitch" value="Information" /&gt;
          &lt;/switches&gt;
          &lt;sharedListeners&gt;
              &lt;add name="FileLog"
                   type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" 
                   initializeData="FileLogWriter"/&gt;
              &lt;!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log --&gt;
              &lt;!--&lt;add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/&gt; --&gt;
          &lt;/sharedListeners&gt;
      &lt;/system.diagnostics&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I am trying to use HDI membership provider and this is my Users table structure:</p>
  
  <p><img src="https://i.stack.imgur.com/Qduay.png" alt="enter image description here"></p>
  
  <p>And in my recent question asked <a href="https://i.stack.imgur.com/n5PZh.png" rel="nofollow noreferrer">here</a> <code>Oded</code> helped me out trying to figure the problem with my Insert statement and I re-modified it and I have an ApplicationName column in my database structure I need to specify it.(As it should not be null value)</p>
  
  <p>Now I need to add my application name by default to enter to database as we do it for web.config.</p>
  
  <p>This is what I mean.</p>
  
  <p><img src="https://i.stack.imgur.com/n5PZh.png" alt="enter image description here"></p>
  
  <p>I need to add that MyApplication to my app.config file.</p>
  
  <p>So How do I do that?</p>
  
  <p>This is how I'm trying to enter user details to database but it is not enetering a single value</p>
  
  <pre><code> Try
              Dim connectionString As String = "Data Source=.\sqlexpress;Initial Catalog=HDIMembershipProvider;Integrated Security=True"
              Using cn As New SqlConnection(connectionString)
                  cn.Open()
                  Dim cmd As New SqlCommand()
                  cmd.CommandText = "INSERT INTO Users ( Username, Password, Email, PasswordQuestion, PasswordAnswer) VALUES(@Username,@Password,@Email,@PasswordQuestion,@PasswordAnswer)"
  
                  Dim param1 As New SqlParameter()
                  param1.ParameterName = "@Username"
                  param1.Value = txtUsername.Text.Trim()
                  cmd.Parameters.Add(param1)
  
                  Dim param2 As New SqlParameter()
                  param2.ParameterName = "@Password"
                  param2.Value = txtPassword.Text.Trim()
                  cmd.Parameters.Add(param2)
  
  
                  Dim param3 As New SqlParameter()
                  param3.ParameterName = "@Email"
                  param3.Value = txtEmail.Text.Trim()
                  cmd.Parameters.Add(param3)
  
                  Dim param4 As New SqlParameter()
                  param4.ParameterName = "@PasswordQuestion"
                  param4.Value = txtSecurityQuestion.Text.Trim()
                  cmd.Parameters.Add(param4)
  
                  Dim param5 As New SqlParameter()
                  param5.ParameterName = "@PasswordAnswer"
                  param5.Value = txtSecurityAnswer.Text.Trim()
                  cmd.Parameters.Add(param5)
  
                  cmd.Connection = cn
                  cmd.ExecuteNonQuery()
                  cn.Close()
              End Using
              Successlbl.show
              Successlbl.show.Text = "Regisration Success."
          Catch
              Errolbl.Show()
              Errolbl.Text = "Your account was not created.Please try again."
          End Try
  </code></pre>
  
  <p>Can anyone point me out where I'm making mistake.</p>
  
  <p>And this is the final result I'm getting while entering to database:</p>
  
  <p><img src="https://i.stack.imgur.com/uTq5y.png" alt="enter image description here"></p>
  
  <p>To be more short and clear I need to enter the above shown User details to my database using the HDI membership provider.</p>