Core Concepts
Producing .NET applications and components requires a compiler that translates source code into IL code. VS.NET, Microsoft's new version of Visual Studio, contains three such compilers VB.NET, C , and managed C . While a full examination of these languages is beyond the scope of a CodeNote, each language is briefly discussed below. Code examples throughout this book will demonstrate some of the nuances of each language and the syntactical differences between them. In addition to the IDE, VS.NET...
Custom Attributes
In the previous example, the metadata in WatSoft.DLL allowed us to dynamically call the Add method using reflection. This metadata was of the standard variety it was produced by the C compiler to describe all the types contained within the assembly. Attributes also produce metadata that we can exploit through reflection. Up to this point, we have differentiated between predefined attributes, which already exist, and custom attributes, which you write yourself. The reality is that all attributes...
Summary Wzl
A web service is a component that can be accessed over the Internet. To expose a web service, you must have it run within a web server that feeds it incoming HTTP requests and sends method results back to the client as HTTP responses. In the .NET Framework, web services are housed by Internet Information Server IIS and ASP.NET. A web service resides in an .asmx file, which is JIT-compiled when the web service is accessed, or in a precompiled assembly that is automatically loaded when the web...
Http Post Example
When communicating with a web service via HTTP POST, data is embedded as name-value pairs in the HTTP request's message body. Unlike HTTP GET, the name-value pairs do not appear as part of the URI. In this example we call the Calculator component that we developed in the Web Service Example section of this chapter. Unlike in the Web Service Example, however, we will not use the web browser to communicate via HTTP GET. Instead, we will use a properly formatted HTTP POST request to access the...
