Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing System.Web.UI and System.Web.Security

Tags:

c#

I can't compile a project because the namespaces System.Web.UI and System.Web.Security are missing. I can only see System.Web.ApplicationServices, System.Web.Mvc and System.Web.Services when I do add references. Where do I download the missing namespaces?

like image 242
SmallChess Avatar asked Jan 13 '11 00:01

SmallChess


4 Answers

Go to menu Project -> Add reference and find out the System.Web.dll in the list

alt text

like image 132
Lorenzo Avatar answered Sep 30 '22 20:09

Lorenzo


I don't know about System.Web.UI, but System.Web.Security moved to the System.Web.ApplicationServices assembly in .NET 4.0 Framework.

like image 31
sgammans Avatar answered Sep 30 '22 19:09

sgammans


Following Kinderchocolate's suggestion, I switched to ".Net Framework 4" in my project's Properties (VS 2010), and that caused "System.Web" to appear in the assemblies list. From then on I was finally able to use System.Web.UI.

So I'm not sure what failed for kinderchocolate, but his change worked for me.

like image 25
Doug Avatar answered Sep 30 '22 19:09

Doug


You can add System.Web.ApplicationServices assembly in .NET 4.5 Framework.

using System.Web.ApplicationServices;

like image 37
Lam Avatar answered Sep 30 '22 20:09

Lam