Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 821876 - Last Review: August 28, 2007 - Revision: 4.5
INFO: Guidelines to Use WinHttp, Managed Code APIs (System.Net classes) or 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 "Summary"
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Â
(http://kbalertz.com/Feedback.aspx?kbNumber=238425/EN-US/
)
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Â
(http://kbalertz.com/Feedback.aspx?kbNumber=303436/EN-US/
)
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.
Collapse this tableExpand this table
| Functionality | System.Net (managed)
classes | WinINet APIs | WinHTTP 5.1 (Win32 and COM APIs) |
|---|
| HTTP (client) | Yes. | Yes. | Yes. |
| Cache | No. Microsoft may add this feature in the future
versions. | Yes. | No. |
| Authentication (Basic, Digest, Negotiate, NTLM) | Yes. | Yes. | Yes. |
| AutoDial | No. Use remote access APIs. | Yes. | No. Use
remote access APIs. |
| Cookies | No. Session cookies only. | Yes. | No.
Session cookies only. |
| FTP | No. You can implement your own protocol handler for FTP.
Microsoft may add FTP in future versions. | Yes. | No. |
| P3P | No. | Yes. | No. |
| Proxy: Includes dynamic proxy Web Proxy Auto-Discovery (WPAD) | No. Static proxy only (Microsoft may add dynamic proxy to
future versions). | Yes. | Yes. |
| SSL | Yes. | Yes. | Yes. |
| Gopher | No. | Yes. | No. |
| Support Services | Yes. | No. | Yes. |
| New features | Yes. Microsoft may add new features. | No.
Microsoft does not plan to add new features. | Yes. Microsoft may add new
HTTP-specific features. |
| Operating systems supported | Microsoft Windows 98, Microsoft Windows Millennium
Edition (Windows Me), Microsoft Windows NT Server 4.0, Microsoft Windows 2000
operating system and Windows 2000 service packs, Microsoft Windows XP operating
system and Windows XP service packs, Microsoft Windows Server 2003 and future
releases. | Windows 9x, Windows Me, Windows NT Server 4.0, Windows 2000 operating system
and Windows 2000 service packs, Windows XP operating system and Windows XP
service packs, Windows Server 2003 and future releases. | Windows 2000
with Service Pack 3 and later, Windows XP with Service Pack 1 and later,
Windows Server 2003 and future releases. |
REFERENCES
For more information about WinHTTP, visit the following
Microsoft Developer Network Web site:
For additional information about WinINet, visit the following
Microsoft Developer Network Web site:
For additional information about classes available in the
Microsoft .NET Framework to access the Internet, visit the following Microsoft
Developer Web site:
For additional information about Windows Sockets APIs, visit the
following Microsoft Developer Web site:
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)
| kbwinsock kbhttp kbapi kbweb kbinfo KB821876 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please