Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

Wednesday, 14 August 2013

C# WebBrowser Control Proxy Authentication

Setting a proxy server for the WebBrowser control is not a straight forward affair. There are plenty of resources out there on the web that will show you how to do this. However, what is lacking is any solutions that show how to authenticate a proxy server, at least any solutions that would work for me. So in this post I am not only going to show you how to set a proxy for the WebBrowser control, I will also share with you the only solution I know of that successfully authenticates with a proxy.

Wednesday, 10 July 2013

C# Dynamic Types

With C# 4.0 we saw the introduction of dynamic types. Objects declared as dynamic are assumed to support any property and method and are therefore not checked by the compiler when you build your solution. If you declare an object as dynamic and attempt to use a property or method not supported by that object a run-time exception will be generated.

Wednesday, 22 May 2013

Custom Change Tracking Using The Entity Framework

Change tracking is a common feature I find I need to implement in my applications. I like to warn users about the potential loss of data if they cancel without saving changes, and when saving those changes I like to update only those fields in the database that have changed as it's inefficient to update every field.

Monday, 6 May 2013

Interprocess Communication with WCF - Part 2

In Part 1 I showed you how you can use WCF with named pipes to send messages from a client to a server. Now I will show you how we can modify that code to send messages in the other direction, from the server back to the client. We do this by creating a callback interface and referencing it in our service contract. We then implement the callback interface in our client.

Tuesday, 30 April 2013

Interprocess Communication with WCF - Part 1

With the introduction of Microsoft's Windows Communication Foundation from .NET 3.0 onwards we have been provided with a powerful framework for communicating across process boundaries, whether they are on the same machine, the same network or even across the internet. A huge range of configuration options are available for the many scenarios that WCF can be used as part of our solution and they can seem overwhelming to begin with.