Exploring The NetCF WebCrawler Sample III – Visual Studio 2005 Beta 2

In the first part of this series, I discussed how the WebCrawler uses an HTTP HEAD request to determine if the URL can be crawled (points to an HTML page).  The Visual Studio.NET 2003 version of the WebCrawler used a very simple check of the Content-Type header (equal to “text/html”).  When I was reviewing the…

1

Exploring the NetCF Web Crawler sample (Visual Studio .NET 2003) – Part II: Updating the UI

A couple of weeks ago, I discussed link tracking in the NetCF Web Crawler sample from Visual Studio .NET 2003.  Today, I would like to use the Web Crawler sample to discuss updating an application’s user interface from a worker thread. When updating user interface elements, it is very important to perform the tasks while…

5

Exploring the NetCF WebCrawler sample (Visual Studio .NET 2003)

Every so often, I talk to people about the NetCF WebCrawler sample that shipped as part of Visual Studio .NET 2003 (\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\Samples\VC#\Pocket PC\WebCrawler).  One of the things I get asked about is how the sample keeps track of the pages it has visited and when it knows to stop. …

0

Accessing a WebService’s WebRequest and WebResponse in NetCF

One common question regarding the .NET Compact Framework involves the availability of the WebRequest and WebResponse objects used by the SOAP client when making a web service call.  If you are using version 1 of the .NET Compact Framework (1.0.2268.0), these objects are not available to your code.  Since the release of Service Pack 1…

0

Determining the IP address of your device

Device’s do not typically register a name with the network.  This means you cannot just use a name to connect to or ping the device.  Back in July 2004, I posted a snippet that shows all of the IP addresses (IPv4 and IPv6) that equate to “localhost”.  Today, I am posting a slightly modified version…

1

Determining the type of data pointed to by a Url – VB.NET version

Earlier today, I posted an example of some Visual C# code that checks the type of the data pointed to by a Url.  I was thinking that it might be nice to post a Visual Basic .NET equivalent… This version is a direct port of the Visual C# code and comes with the same caveat:…

1

Determining the type of data pointed to by a Url

Have you ever wanted to know what type of file was being pointed to by a given url before clicking the link?  Maybe you are writing an application that needs to filter out certain types of links.  A web crawler is a good example of an application which needs to do such link filtering (skip…

5

Simpifying socket exception handling

Remembering numeric error codes is hard.  Unless the error handling code is well documented, code reviews take longer and maintenance is more difficult as you may need to consult reference manuals, native code header files or online help frequently. Socket errors are particularly hard for me to remember.  To help myself out, I have collected…

2

Simple object remoting using the XmlSerializer

Today, I’m going to talk about how you can use the XmlSerializer, TcpClient and TcpListener classes to create a simple remoting layer to send your custom objects from one device to another.  This post requires the .NET Compact Framework version 2 (beta 1) or the .NET Framework for desktop PCs. Since NetCF doesn’t support the…

3

WebExceptions, ServicePoints and Connection Limits

Today’s topic involves WebExceptions and their proper handling.  Along the way, we’ll talk a little about HttpWebResponse, ServicePoint and connection limits. Whenever you write an application that communicates on the web, you inevitably run into connection issues (site moved, incorrect access credentials, insufficient privileges to view the site, etc).  .NET applications inform you of these…

0