Microsoft KB Archive/821876

= INFO: Guidelines to Use WinHttp, Managed Code APIs (System.Net classes) or WinInet =

Article ID: 821876

Article Last Modified on 8/28/2007

-

APPLIES TO


 * Microsoft .NET Framework 1.0
 * Microsoft .NET Framework 1.1
 * Microsoft Windows HTTP Services 5.0
 * Microsoft Windows HTTP Services 5.1
 * Microsoft Windows Internet Services (WinInet)

-



SUMMARY
This article describes the differences between Windows HTTP Services (WinHTTP), managed code APIs (System.Net namespace classes), and Windows Internet API (WinINet). (With the release of the February 2003 Software Developer Kit [SDK], the tool formerly abbreviated WinInet is now named WinINet.) This information is designed to help you select the correct technology to use when your application requires Internet or intranet resources. This article does not cover higher level tools such as the SOAP Toolkit, Microsoft XML Core Services (MSXML) objects, Web services proxies in managed code, or client-side Active Template Library (ATL) Server classes such as CAtlHttpClientT and CSoapSocketClientT. When you must have more control than the APIs in this &quot;Summary&quot; section provide, you can use socket APIs.



MORE INFORMATION
 Affected components should use WinHTTP. WinHTTP is supported in the context of a system service. Another solution is to use System.Net classes or sockets directly. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

238425 WinInet Not Supported for Use in Services

 If yours is a new unmanaged Microsoft Win32-based project in Microsoft C or in Microsoft C++, use WinHTTP or System.Net classes if the functionality that you must have is available through WinHTTP or through System.Net classes (see the table that follows). If you call managed-code APIs from unmanaged code, you can use the managed-code APIs without rewriting them. If your application is a Microsoft Visual Basic 6.0 application, use the WinHttpRequest COM object. For managed code applications, use the managed code http stack (System.Net.WebRequest classes) if the functionality is available. Note: Other HTTP protocol managed classes are HttpWebRequest\HttpWebResponse and WebClient. For additional information about how to use the classes, click the following article number to view the article in the Microsoft Knowledge Base:

303436 SAMPLE: Visual C# .NET Networking Classes HTTP Internet Client



The following table shows the solutions and operating systems that Microsoft supports, that Microsoft may support in the future, and that Microsoft does not support.

