How to use the new System.Net classes to create an HTTP client

Article translations Article translations
Article ID: 303436 - View products that this article applies to.
This article was previously published under Q303436
Expand all | Collapse all

Summary

The CSharpHTTP.exe file sample that is provided through this article shows how to use the new System.Net classes to create an HTTP client that uses the HttpWebRequest and HttpWebResponse classes. This sample shows how to use the following HTTP verbs:
  • HEAD
  • GET
  • POST
  • PUT
It also demonstrates how to handle cookies and certificate errors when you use Secure Sockets Layer (SSL). This sample is based on the VBHTTP sample that is included with the Platform Software Development Kit (SDK).

More information

The following file is available for download from the Microsoft Download Center:
CSharpHTTP.exe
Release Date: August 23, 2001

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file. The Csharphttp.exe file contains the following files:

Collapse this tableExpand this table
Assemblyinfo.cs3 KB
Csharphttp.csproj5 KB
Csharphttp.csproj.user2 KB
Csharphttp.sln1 KB
Csharphttp.suo8 KB
Csharphttp_debug.projdata9 KB
Form1.cs47 KB
Form1.resx2 KB
Licenses.licx2 KB


Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs.
If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites:

Microsoft Certified Partners - https://partner.microsoft.com/global/30000104

Microsoft Advisory Services - http://support.microsoft.com/gp/advisoryservice

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

Properties

Article ID: 303436 - Last Review: March 21, 2013 - Revision: 5.0
Applies to
  • Microsoft Visual C# .NET 2002 Standard Edition
  • Microsoft Visual C# 2005
Keywords: 
kbhowto kbdownload kbfile KB303436

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com