cyprich.com

Occasionally Relevant Insights from a Software Builder

By

How to Fix: “The name ‘HttpUtility’ does not exist in the current context”

The HttpUtility class is a part of System.Web in Visual Studio and should be available in .NET 4.0. If you include this library in your application and an error is being generated, check the properties of the project. In the Application tab, the Target framework should not be a Client Profile, but the full framework, i.e. .NET Framework 4 (see image below).

Setting Target Framework in project properties.

If this doesn’t fix the error, then add System.Web as a reference to your project (see image below).

Adding System.Web to references.

The error should be corrected after these changes are applied.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>