Faqs on asp.net,c#,vb.net and sqlserver2005

this blog covers all the Faqs related to .net technologies like asp.net,vb.net,c#.net,ajax,javascript and sqlserver2005.

Jan 30, 2008

UPnP Application Development Using C#

Did you hear about the refrigerator of the future that not only chills your food but also includes a connection to the Internet? Or the microwave that lets you read your e-mail as it heats your Pop-Tart? What? No appeal?

Well, how about a network-enabled alarm clock that knows your appointments, checks traffic and weather, calculates when you need to wake, and in the morning tells you the time of your flight, the weather at your destination, and when you need to leave. On your way to the airport, your UPnP-enabled personal digital assistant (PDA) finds the best place to park and orders a latte to be ready for you in the concourse. As you travel, your PDA tracks your appointments, makes restaurant and hotel reservations, confirms flights, and orders groceries to be delivered the day you arrive home. As far as I can tell, these oddities and cool devices don't exist yet, but they've become possible due to the existence of Universal Plug and Play (UPnP).

What is UPnP?

UPnP technology extends Plug and Play to simplify the networking of intelligent devices in homes and businesses. When devices incorporating UPnP technology are physically connected to the network, they'll connect automatically to one another over the network, without the need for user configuration or centralized servers.
The UPnP specification is based on TCP/IP and Internet protocols that let devices communicate with each other. That's why it's called universal—UPnP technology doesn't rely on specific device drivers, using instead these standard protocols. UPnP devices can automatically configure network addressing, announce their presence on a network subnet, and permit the exchange of device and service descriptions. A Windows XP-based computer can act as a UPnP control point, discovering and controlling devices through a program interface.
This might not sound all that revolutionary when compared to regular old Plug and Play that's been around for some time. Adding Plug and Play technology to the operating system has made it easier to setup, configure, and add peripherals to a single computer. But the big deal about UPnP is what it can do for the home or small business user who isn't a networking professional, but who wants to be able to reliably play multi-player games, use real-time communications (Internet telephony, teleconferencing), and other technologies such as Remote Assistance in Windows XP. Until now, only big corporations with fully-staffed IT departments could do these things easily (though I doubt that multi-player gaming, much less a Web-surfing refrigerator, is a big part of their emphasis).

Network Address Translation


The addressing system on the Internet was designed long before the active presence of millions of home networks, with more being added daily. In fact, it's nothing short of miraculous that an addressing system thought up when the Internet was in its infancy still works.

Because the stock of Internet addresses is rapidly depleting, most home networks employ a gateway using Network Address Translation (NAT). NAT is an Internet Engineering Task Force standard that allows multiple PCs or devices on a private network to share a single, globally unique, public address (using private address ranges such as 10.0.x.x, 192.168.x.x, 172.x.x.x). As a temporary fix for the shortage of addresses, NAT works nicely for most things—Internet Connection Sharing in Windows XP uses NAT, as do many gateway devices such as DSL and cable modems.

The problem is that NAT expects each network application to communicate in a standard fashion using IP addresses in packet headers, but some network applications do not anticipate the existence of NAT. They use embedded IP addresses that the NAT cannot translate.

NAT Traversal Technology

NAT traversal technology allows network applications to detect that they are behind a UPnP-enabled NAT device. Then the applications can learn the shared, globally-routable IP address, and configure port mappings to forward packets from the external port of the NAT to the internal port used by the application—and all automatically so the user doesn't have to manually configure port mappings or other such rigmarole. NAT traversal allows network devices or peer-to-peer applications to traverse a NAT gateway by dynamically opening and closings ports for communication with outside services.

Enabling the UPnP User Interface

In some cases, Windows XP will discover UPnP devices and provide its own user interface to control them. An example is the user interface (UI) for UPnP residential gateway devices in the Network Connections folder. The popular Linksys BEFSR41W wireless router shows up automatically in the Network Connections folder after it's installed because an application is included in Windows XP.

In addition, you can install the optional UI component using the steps below. This UI component displays a balloon tip for newly discovered devices and places an icon for each device in the My Network Places folder. To enable the UPnP UI, follow these steps:

1.

Click Start, click Control Panel, and then click Add or Remove Programs.

2.

In the Add or Remove Programs dialog box, click Add/Remove Windows Components.

3.

In the Windows Components Wizard, click Networking Services, click Details, and then select the Universal Plug and Play check box.

4.

Click OK, and then click Next in the Windows Components Wizard. You may need to provide your Windows XP installation CD


You can now see if any UPnP-enabled devices exist on your network by opening My Network Places. If there are UPnP devices on your local network, they will appear here with a generic icon based on the device type. In the future when a UPnP device is installed on the network, a notifying icon will appear briefly in the System Tray. When you see this icon, go to My Network Places to view the new device.

Support for UPnP technology and NAT traversal is an important feature to look for in an Internet gateway device. If you're purchasing or leasing an Internet gateway device, consider only those devices that support UPnP for NAT traversal because this feature can make such a difference to the home network.

For more information about UPnP and NAT traversal, visit the UPnP Forum of which Microsoft was a founding member and now consists of more than 488 vendors.

UPnP Security Concerns

UPnP technology has been adopted by a wide range of device vendors due to its simplicity and adherence to open standards. The initial implementation of UPnP technology in Windows XP, however, had some security vulnerabilities, which an attacker could have used to slow the operation of your PC or, under very rare circumstances, obtain elevated privileges on your system. However, none of these issues would surface if you install a firewall on Windows XP. Windows XP, in fact, ships with the Internet Connection Firewall (ICF), which is installed by default on your Internet connection, thereby protecting you from attackers on the Internet. The security vulnerabilities found have since been fixed. Microsoft Security Bulletin MS01-059 discusses these issues and provides links to more information in Knowledge Base articles and to the patch download.

0 Comments:

Post a Comment

<< Home