title: How do you protect a page using a web.config file?
body: <p>Heey Stackoverflowers</p>
  
  <p>My question is: how do I protect a Page using web.config or Global.asax?</p>
  
  <p>Example:</p>
  
  <p>Direct url <code>www.Yoururlhere.com/Account/Edit.aspx</code> is currently accesible from url bar, but that is not what I want.  I have a login page already with database etc working, only it's missing the protection to remove direct access or by Login.</p>
  
  <p>Can you help me?  My second web.config for Folder Account is as following:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
      &lt;system.web&gt;
          &lt;location path="Edit.aspx"/&gt;
      &lt;/system.web&gt;
      &lt;system.web&gt;
          &lt;authorization&gt;
              &lt;allow users="*"/&gt;
              &lt;deny users="?" /&gt;
         &lt;/authorization&gt;
      &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>