Application Security
A less systematic way of securing your web services involves taking security into your own hands. You can program your web services so that all of their methods require an access token, which can be obtained from the web service after sending in the client's username and password. The client credentials can be sent to the server through SSL, which eliminates the risk of sending clear-text passwords across the wire. Through this SSL channel, the server returns an access token to the caller, who...
Sharing and Reuse
When you want to share your assembly with the rest of the world, your assembly must have a shared or strong name, and you must register it in the GAC. Likewise, if you want to use or extend a particular class that is hosted by a particular shared assembly, you don't just import that specific class, but you import the whole assembly into your application. Therefore, the whole assembly is a unit of sharing. Assemblies turn out to be an extremely important feature in .NET because they are an...
XmlReader
The XmlReader object, which currently supports XML 1.0, is a fast, noncached, forward-only way of accessing streamed XML data. There are two derivatives of XmlReader XmlTextReader and XmlNodeReader. Both of these readers read XML one tag at a time. The only difference between the two is the input to each reader. As the name implies, XmlTextReader reads a stream of pure XML text. XmlNodeReader reads a stream of nodes from an XmlDocument. The stream can start at the beginning of the XML file for...
State Management and Scalability
ASP.NET overcomes all major limitations of ASP when it comes to managing session states. As you are aware from ASP development, a session state is nothing but a named variable that is cached at the server for the duration of the web user's session. As the user navigates through the web application, the session state retains its value as long as the session is not expired. ASP Session state management can be summarized as follows The session starts, and the web application assigns a unique key...
Conclusion
Windows Forms provides a unified programming model for standard Windows application development. It does not matter what language you are using you can always be productive because the common substrate has been developed to benefit all. Windows Forms brings a true object-oriented programming model to Windows GUI development, allowing for an extensible framework that is so much cleaner and easier to use compared to previous attempts. In this chapter, we've shown you the architecture of the...
Web Services Discovery
Even though advertising of a web service is important, it is optional. Web services can be private as well as public. Depending on the business model, some business-to-business B2B services would not normally be advertised publicly. Instead, the web service owners would provide specific instructions on accessing and using their service only to the business partner. To advertise web services publicly, authors post discovery files on the Internet. Potential web services clients can browse to...
XML parsers
Even though XML is text based and readable by humans, you still should have some way of programmatically reading, inspecting, and changing XML. This is the job of XML parsers. There are two kinds of XML parsers tree-based and event-based. Depending on your needs, these two types of parsers should complement each other and serve you well. Tree-based XML parsers read the XML file or stream in its entirety to construct a tree of XML nodes. Think of these XML nodes as your XML tag lt vin gt...
DataRelation
A DataSet object as a collection of DataTable objects alone is not useful enough. A collection of DataTable objects returned by a server component provides little improvement upon the chained recordset in previous versions of ADO. In order for your client application to make the most of the returned tables, you also need to return the relations between these DataTables. This is where the DataRelation object comes into play. With DataRelation, you can define relationships between the DataTable...
The WebMethod Attribute
Public methods of any classes can be tagged with the WebMethod attribute to be made accessible from the Web. The syntax for tagging attributes to methods is different for each .NET language. For example, in C the tag takes the following form attribute value public returnType FunctionName paramsList In VB, angle brackets are used instead of square brackets, and the tag location is also different Public Function attribute value gt FunctionName paramsList as returnType Public Sub attribute value...
Figure 24 Major CLR components the Virtual Execution Engine VEE
.NET PE Files metndntn and IL . CLB's ViriKHl Execution Engine Garbage iollatlar, urity angina, toda itinikxjar, ei epl on monngsr, llirecd support, at The major components of the CLR include the class loader, verifier, JIT compilers, and other execution support, such as code management, security management, garbage collection, exception management, debug management, marshaling management, thread management, and so on. As you can see from Figure 2-4, your .NET PE files layer on top of the CLR...