title: Could not load type from assembly 'App_Code'
body: <p>I want to create a custom HTTP module in asp.net. <a href="https://msdn.microsoft.com/en-us/library/ms227673(v=vs.85).aspx" rel="nofollow">This article</a> shows how to do it I followed the steps and here is my class which inherits from <code>IHttpModule</code> </p>
  
  <pre><code>public class LanguageModule : IHttpModule
  {
  
      public void Init(HttpApplication context)
      {
          context.AcquireRequestState += new EventHandler(OnAcquireRequestState);
      }
  
      public void Dispose()
      {
  
      }
  
      public void OnAcquireRequestState(Object i_object, EventArgs i_eventArgs)
      {
          HttpApplication l_httpApplication = i_object as HttpApplication;
  
          // check whether the language change parameter has been passed
          var l_language =
              l_httpApplication.Request.Params[Constants.SESSION_LANGUAGE];
          var l_boolLanguageChanged = false;
          if (l_language == null)
          {
              // if language parameter is not sent, then take language from session
              l_language = (string)l_httpApplication.Session[Constants.SESSION_LANGUAGE];
          }
          else
          {
              // If language parameter is indeed sent, then user wants to change language.
              // I will make sure I tag this in order to redirect to.
              l_boolLanguageChanged = true;
          }
  
          // having the language a thand, let us set it.
          var l_culture = new System.Globalization.CultureInfo(l_language);
  
          Thread.CurrentThread.CurrentCulture = l_culture;
          Thread.CurrentThread.CurrentUICulture = l_culture;
  
          // save language to session
          l_httpApplication.Session[Constants.SESSION_LANGUAGE] = l_language;
  
          // check whether I have redirect
          if (l_boolLanguageChanged &amp;&amp; l_httpApplication.Request.UrlReferrer != null)
          {
              l_httpApplication.Response.Redirect(
                 l_httpApplication.Request.UrlReferrer.AbsolutePath);
          }
  
      } // OnAcquireRequestState
      //-------------------------
  
  } // class LanguageModule
  </code></pre>
  
  <p>Then I registered this module in <code>web.config</code> file like so </p>
  
  <pre><code>&lt;httpModules&gt;
         &lt;add name="LanguageSettingModule" type="LanguageModule, App_Code" /&gt;
  &lt;/httpModules&gt;
  </code></pre>
  
  <p>I tried also to register it under <code>system.web</code> tag like so </p>
  
  <pre><code>&lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"&gt;
          &lt;add name="LanguageSettingModule" type="LanguageModule, App_Code" /&gt;
      &lt;/modules&gt;
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p>file <code>LanguageModule</code> is placed under App_Code folder</p>
  
  <p>But I'm always getting this error </p>
  
  <blockquote>
    <p>Could not load type from assembly 'App_Code'.</p>
  </blockquote>