Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

Impersonation code in C#

While investigating a customer issue, I needed code to impersonate a different user on the current thread. A quick search of the msdn blogs turned up this post , which got me most of the way there. I decided to wrap the code into a class that inherits
Posted by joncole | 2 Comments
Filed under:

Sample Asynchronous SslStream Client/Server Implementation

I was recently asked about sample code for the System.Net.Security.SslStream using the asynchronous APIs. I searched the web and couldn't find anything significant, so I decided to write some that included the asynchronous usage of the TcpListenter and

Creating a Process Memory Dump

When trying to help customers debug some issues it is periodically necessary to get a memory dump (snapshot) of a process for analysis at another time or place. This is frequently the case when an error is intermittent or a live debug session is not feasible
Posted by joncole | 2 Comments
Filed under:

Be consistent in your configuration

I recently worked with a customer using BizTalk 2004. They were experiencing some very odd behavior where a WebService client would call into a BizTalk WebService and experience a long wait before the client finally got a timeout error. The timeout happend
Posted by joncole | 0 Comments
Filed under: ,

Suggested Practices for proxy configuration when using System.Net.HttpWebRequest

I have periodically received questions on how to configure code using HttpWebRequest in an application that may be run in multiple types of environments (home user, corporate domain, with or with out a proxy, etc). This is what I would suggest. Don't
Posted by joncole | 2 Comments
Filed under:

Simple Message Framing Sample for TCP Socket - Part 2 (Asynchronous)

As a follow up to my last post ( http://blogs.msdn.com/joncole/archive/2006/03/20/555721.aspx ) I decided to add some sample code for implementing an asynchronous version of ReadMessage. All of the same rules apply as discussed in my previous post, but

Simple Message Framing Sample for TCP Socket

A common misunderstanding for developers new to network programming over TCP sockets is how messages are sent and received. I frequently hear the statement that "my data is not arriving on the other side of the socket in the same format that I sent it."
Posted by joncole | 11 Comments
Filed under: ,

Debugging a memory leak in managed code: Ping - SendAsync

Included in version 2.0 of the .NET framework is a Ping class (System.Net.NetworkInformation namespace) that can be used to monitor the up/down status of a network connection to a server. We recently realized that we had a minor bug in the class that
Posted by joncole | 19 Comments
Filed under: ,

Managed classes to view/manipulate the Windows Firewall

I have been needing a set of classes to give me access to the settings for the Windows Firewall. I did a quick search and didn't find much that would help me in my quest to view or manipulate these settings, so I ended up writing my own managed wrapper
Posted by joncole | 11 Comments
Filed under:

HttpWebRequest and Authentication - Part 1

Authentication over HTTP is a way for a client to prove its identity to the server so that it can gain access to a resource. In this series I will discuss the various types of authentication to servers and to proxy servers. I assume you have a basic understanding
Posted by joncole | 0 Comments
Filed under:

HttpWebRequest and Expect 100 Continue

How do the ServicePointManager.Expect100Continue and ServicePoint.Expect100Continue properties change the behavior of my HttpWebRequest? This is a question that seems to come up from time to time and I thought I would give a little more information. First,
Posted by joncole | 5 Comments
Filed under:
 
Page view tracker