13.07.2015 Views

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

makes cod<strong>in</strong>g significantly easier. In fact, programmers don't have to worry aboutpossible conflicts with other applications attempt<strong>in</strong>g to access the same port. Inaddition, dynamic port allocation also <strong>in</strong>creases the overall level of flexibility becausethe particular communication port doesn't have to be hard-coded or persistedsomewhere as an application-specific argument. On the down side, systemadm<strong>in</strong>istrators don't usually agree to leave such a wide range of ports open to <strong>in</strong>boundtraffic because do<strong>in</strong>g so could leave a major hole <strong>in</strong> security.NoteThe DCOM security model is based on the assumption thatdevelopers and adm<strong>in</strong>istrators configure the security sett<strong>in</strong>gsproperly <strong>for</strong> each component. The net effect of this approach is thatthe same b<strong>in</strong>ary code works unchanged both <strong>in</strong> environments <strong>in</strong>which the security is of no concern (<strong>for</strong> example, on a local s<strong>in</strong>glemach<strong>in</strong>e) and <strong>in</strong> environments <strong>in</strong> which the code needs to beprocessed <strong>in</strong> a secure fashion (as <strong>in</strong> a fully distributed environment).DCOM Extensions <strong>for</strong> the InternetOver the years, DCOM has been extended to work around this security issue. Inparticular, the COM Internet Services (CIS) layer has given DCOM the capability towork over port 80 thanks to a new transportation protocol called Tunnel<strong>in</strong>gTransmission Control Protocol (TTCP). CIS works as an Internet Server Application<strong>Programm<strong>in</strong>g</strong> Interface (ISAPI) filter and requires <strong>Microsoft</strong> Internet In<strong>for</strong>mationServices (IIS) 4.0 or later to run on the server mach<strong>in</strong>e. Basically, TTCP works byfool<strong>in</strong>g the firewall. At the very beg<strong>in</strong>n<strong>in</strong>g of each DCOM operation, TTCP shakeshands with the server, declar<strong>in</strong>g its <strong>in</strong>tention to use HTTP over port 80. If the firewallagrees, what follows is a traffic pattern of non-HTTP packets that are blissfully deliveredover port 80 of those firewalls that are lazy enough to accept b<strong>in</strong>ary packets overHTTP. All <strong>in</strong> all, CIS gives DCOM a good chance of enter<strong>in</strong>g through a w<strong>in</strong>dow when itf<strong>in</strong>ds that the front door is locked. This peculiarity also affects the way DCOMcomponents work. In fact, server components can't call back the client component tos<strong>in</strong>k events or send notifications..<strong>NET</strong> Remot<strong>in</strong>g to the RescueWhat's new and better with .<strong>NET</strong> Remot<strong>in</strong>g? The advent of the .<strong>NET</strong> Frameworkpushed COM-related technology aside, and DCOM is no exception. The .<strong>NET</strong>Framework architecture <strong>for</strong> remot<strong>in</strong>g arose completely redesigned, with two key goalsto pursue: allow<strong>in</strong>g <strong>for</strong> seamless and location-<strong>in</strong>dependent cod<strong>in</strong>g while provid<strong>in</strong>g a fullyoperational way of <strong>in</strong>teract<strong>in</strong>g with restricted servers.NoteThe previous statement about the dim<strong>in</strong>ished status of COM-relatedtechnologies doesn't imply that exist<strong>in</strong>g COM components areobsolete <strong>in</strong> the new .<strong>NET</strong> world. On the contrary, the .<strong>NET</strong>Framework <strong>in</strong>tegrates seamlessly with COM components and theW<strong>in</strong>32 API through ad hoc <strong>in</strong>teroperability mechanisms such asCOM Callable Wrappers (CCWs) and P/Invoke. By adopt<strong>in</strong>g a"leave-no-COM-object-beh<strong>in</strong>d" philosophy, the .<strong>NET</strong> Frameworkdesigners ensured the cont<strong>in</strong>ued success of exist<strong>in</strong>g COM-relatedtechnologies even as developers migrate to the .<strong>NET</strong> Framework.The .<strong>NET</strong> Remot<strong>in</strong>g classes allow <strong>for</strong> optimized and effective communication between.<strong>NET</strong> Framework applications. They don't offer even the possibility of be<strong>in</strong>g used <strong>in</strong> anyother scenario. For cross-plat<strong>for</strong>m scenarios <strong>in</strong> which heterogeneous environments are425

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!