title: How to solve 'Authorize' is an ambiguous reference between 'System.Web.Mvc.Authorizeattribute' and 'ProjectDefaultNamespace'?
body: <p>As following to <a href="https://stackoverflow.com/a/5844884">this</a> answer I have created an <code>AuthorizeAttribute</code> class in my projects default namespace. So that the compiler will automatically pick it up instead of MVC's standard one. But it picks <code>System.Web.Mvc.Authorizeattribute</code>.</p>
  
  <p>If I include my projects namespace, which is <code>using TestIdentitySample;</code> then the following error was shown </p>
  
  <pre><code>  'Authorize' is an ambiguous reference between 'System.Web.Mvc.Authorizeattribute' and 'ProjectDefaultNamespace'
  </code></pre>
  
  <ul>
  <li>Please be noted that I do not want to use <strong>fully qualified name</strong> or <strong>namespace alias</strong> or <strong>other Custome Attributes name</strong>.</li>
  </ul>
  
  <blockquote>
    <p>My AuthorizeAttribute Class</p>
  </blockquote>
  
  <pre><code>namespace TestIdentitySample
  {
      [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = true)]
      public class AuthorizeAttribute : System.Web.Mvc.AuthorizeAttribute
      {
          protected override void HandleUnauthorizedRequest(System.Web.Mvc.AuthorizationContext filterContext)
          {
              if (filterContext.HttpContext.Request.IsAuthenticated)
              {
                  filterContext.Result = new System.Web.Mvc.HttpStatusCodeResult((int)System.Net.HttpStatusCode.Forbidden);
              }
              else
              {
                  base.HandleUnauthorizedRequest(filterContext);
              }
          }
      }
  }
  </code></pre>
  
  <p>I just want that the compiler will automatically pick it up instead of MVC's standard one if it is possible. Thanks in advance for any help.</p>