title: An attribute argument must be a constant expression , typeof expression or array creation expression of an attribute parameter type
body: <p>I want to assign Group name as an attribute for authorize filter.</p>
  
  <p>It will take as below</p>
  
  <blockquote>
  <pre><code>[FilterConfig.AuthorizeAd(Group = "DirectoryName")]
   public ActionResult GetData()
    {
    }  
  </code></pre>
  </blockquote>
  
  <p>Insted of hardcoding i tried by adding it as below</p>
  
  <blockquote>
  <pre><code>[FilterConfig.AuthorizeAd(Group = Constants.ActiveDirectoryName)]
  </code></pre>
    
    <p>Where Constants is class and created member as below:</p>
  
  <pre><code>public const  string ActiveDirectoryName = "directoryName";
  </code></pre>
  </blockquote>
  
  <p>Now i want to aceess it from app.config, tried as below</p>
  
  <blockquote>
  <pre><code>[FilterConfig.AuthorizeAd(Group = ConfigurationManager.AppSettings["Directory_Name"].ToString()
  </code></pre>
  </blockquote>
  
  <p>It is throughing the error msg as "An attribute argument must be a constant expression"</p>
  
  <p>How can i assign the data from config?
  Please suggest me.</p>