namespace name "HttpWebRequest" does not exist in namespace "System.Net"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shalong
    New Member
    • Feb 2008
    • 4

    namespace name "HttpWebRequest" does not exist in namespace "System.Net"

    Hi all,
    VS 2008 is complaining that HttpWebRequest class is not in System.Net namespace

    I have referenced System.Net and have coded "using System.Net"

    I think its a setup problem rather than a coding error

    The type or namespace name 'HttpWebRequest ' does not exist in the namespace 'System.Net' (are you missing an assembly reference?) C:\Documents and Settings\user\M y Documents\Visua l Studio 2008\Projects\W ebDAV\WebDAV\We bDAVAppointment Handler.cs 25 19 WebDAV

    Any help much appreciated
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    What type of project is this?
    If you go to the references section in the solution explorer, you should see some namespaces listed.
    I have:
    System
    System.Data
    System.Deployme nt
    System.Drawing
    System.Manageme nt
    System.Windows. Forms
    System.XML

    With just those in the references section, I am able to find HttpWebRequest under the System.Net namespace.

    According to msdn, it's supported in all .NET versions:

    Comment

    • shalong
      New Member
      • Feb 2008
      • 4

      #3
      Aha!!!

      I had the system.net and system.security referenced

      after adding system (alone) it built successfully

      Thanks....

      Comment

      Working...