title: ASP.NET C#: JavascriptSerializer could not be found
body: <p>I'm trying to use the JavascriptSerializer object in ASP.NET v4.0 with C#.  I'm not using Visual Studio--this is on a live IIS7 server.  I can access this object just fine using VB on this same web server, so I know the requisite DLLs are present and correctly configured.  </p>
  
  <p>But when I try to use this object in C#, I get this error: <code>The type or namespace name 'JavascriptSerializer' could not be found</code></p>
  
  <p>In my class file, I have this:</p>
  
  <pre><code>using System.Web;
  using System.Web.Script;
  using System.Web.Script.Serialization;
  </code></pre>
  
  <p>In web.config, I have this:</p>
  
  <pre><code>&lt;assemblies&gt;
      &lt;add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;
  &lt;/assemblies&gt;
  </code></pre>
  
  <p>In my default.aspx.cs file, I have this:</p>
  
  <pre><code>JavaScriptSerializer obj_serializer = new JavascriptSerializer();
  </code></pre>
  
  <p>It's this last line of code that is causing the above referenced error.  </p>
  
  <p>Help?</p>