views:

141

answers:

3

I'm trying to use the HTTP functions contained in the System.Web.dll assembly. However, whilst the dll seems to exist in the same directory as every other dll Visual Studio 2010 references in my project, it fails to link in and raises a warning - "The referenced component 'System.Web' could not be found". The dll, however, is definitely there within the same folder as all others referenced by the project and selecting it in 'browse for reference' mode allows me to add it - it then fails to fill in the 'Path' property. Am I doing something wrong? How can I make System.Web available in my project?

Any help is much appreciated!

Edit: I don't have any reference to System.Web in the .Net tab of the 'Add Reference' window.

+1  A: 

System.Web should be referenced from the GAC. This assembly has nothing to do in your application folders.

alt text

Darin Dimitrov
I don't have those .NET references - only System.Web.Services and System.Web.ApplicationServices shows up.
JoeR
A: 

Are you trying to add a reference to the System.Web.dll file itself? System.Web is in the GAC on any Windows system, so when you add the reference in your "Add Reference" dialog, choose System.Web from the .NET tab.

AJ
I don't have those .NET references - only System.Web.Services and System.Web.ApplicationServices shows up. Hence trying to add the dll itself.
JoeR
A: 

If you target .NET 3.5 or 4 client profile, you won't see ASP.NET assemblies.

Besides, you should try to use HTTP classes in System.Net.

Lex Li
Thanks! I found the functionality I wanted in the System.Net class after all.
JoeR