
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
936
|
Chapter 16: Networking
Output for the Solution:
Current Proxy Address: CORPORATEPROXY
Current Proxy Port: 8080
Current ByPass Local Address setting: True
Exception addresses for proxy (bypass):
corporate.com
<local>
Proxy connection type: PROXY_TYPE_DIRECT, PROXY_TYPE_PROXY
Discussion
The WinInet Windows Internet (WinInet) API is the unmanaged API for interacting
with the FTP, HTTP, and Gopher protocols. This API can be used fill in where man-
aged code leaves off, such as with the Internet configuration settings shown in the
Solution. It can also be used for downloading files, working with cookies, and partic-
ipating in Gopher sessions. You need to understand that WinInet is meant to be a
client-side API and is not suited for server-side or service applications; issues could
arise in your application from improper usage.
There is a huge amount of information available to the C# programmer directly
through the
FCLFramework class FCLibrary, but at times you still need to roll up your
sleeves and talk to the Win32 API. Even in situations in which restricted privileges
are the norm, it is not always out of bounds to create a small assembly that needs
enhanced access to do P/Invoke. It can have its access locked down so as not to
become a risk to the system.
See Also
See the “InternetQueryOption ...