A colleague has been asking how to do this and I've found a great post written years ago. I've linked it here...
This is just a quick addendum to a colleague's post about using JSON in .NET. Read more for an example and a link to the original post.
Have you ever wanted to change the default namespace of an XmlDocument in .NET. It's not as easy as it might be.
Today I've been talking to some of our developers about generics in C#. As part of it, we worked through an example, the Badger Example, which I've reproduced here for those intrigued!
I've been looking at the C# specification for the new keyword when used on a class member declaration and thought I'd share my findings. If you are a die-hard C# coder then you won't find anything new here, but of course that doesn't mean that you already know it! Maybe it would be better to check...
Have you ever wanted to remove a handler from an event, but haven't had a reference to the object receiving the event, or perhaps you don't even know what type the object has! .NET hides the details of events but with a bit of help from the Reflection classes, you can edit the handlers for your own purposes.
I was recently asked why some expressions didn't seem to be doing what the developer intended. Typically, this was due to the use of the short or byte data types. This post is a brief discussion on the related parts of the C# Language Specification (version 3.0).
I'm in the process of writing a Visual Studio template extension to automate the creation of Windows Communication Foundation components. As part of the Wizard, I want to allow users to configure options based on various enumerations. To help with this, I've developed a generic control that extends a ComboBox to manage a set of allowed values automatically. This way, the same code can be used with any .NET enumeration type.
Following my earlier post about WCF service design guidelines, I've created some WCF code snippets to simplify the implementation of services, operations, messages and data contracts.
Some of you might have recognised that we are using a customised version of the SubText blogging engine for these blogs. Recently, I've made some changes to support additional feeds and I thought I'd share them with you.
Microsoft has released an article comparing the performance of WCF and .NET 2.0 distributed application technologies such as ASMX web services, WSE web services, COM+ applications and .NET 2.0 remoting. The results are surprising.
I'm currently writing a service that needs to provide long-lived callback behaviour to a large number of clients. In this case, the WCF session semantics are not appropriate and so I can't use the ServiceContractAttribute's CallbackContract property.
The content of this post was written in response to a query by a colleague wanting to reclaim memory used by a .NET component used as part of a legacy application. Concerns were also raised about memory leaks in .NET. In this post I describe some of the basics of .NET and COM memory management, and how to explicitly manage .NET component memory use.
Microsoft have released significant parts of the .NET framework source code for developers using Visual Studio 2008. In case you've not been following the releases, this blog post includes links to configuration and hotfix resources.
By default, WCF limits the amount of data that can be transferred through an operation invokation in subtle ways. To override these default limits, you will need to alter both the client and service configuration. No changes to your code are needed, though.
I've recently begun playing around with developing an SOA solution using WCF. My focus is on implementing a service that is loosely coupled, autonomous, highly configurable and reusable. I might tell you more about it in a later blog, but for now I want to describe some of the design issues involved.
I've been playing around a bit with the idea of integrating Windows Workflow Foundation into custom web server controls. I've had some success but also hit something of a wall. If you have any experience with any of these issues, I'd love to hear from you.
I've recently hit an issue where some custom controls have been generating exceptions when unpublished pages exist in an EPiServer site. In these cases, the relevant (required) properties have null values.
When you are using the (very helpful) UpdatePanel, the browser doesn't keep track of the asynchronous postbacks. This means that when the user clicks the back button in the browser, they go to the navigation prior to the last full postback. How can you resolve this?
I've been importing a live EPiServer site into a development environment for further work. Normally, this works without problem, but this time I've been getting a POST error, but nothing informative. What's happening?
I came across this problem when trying to help someone with multithreaded P/Invoke calls to an unmanaged DLL. This DLL had previously worked with unmanaged (Win32) applications. Note that this post does not apply to consuming COM objects. Read more here...
Sometimes you need to run the same orchestration within two BizTalk applications on the same server. How can you distinguish which application you are in from within an orchestration?
If you are interested in service-oriented architecture, including analysis and design, then have a look at this book: Service-Oriented Architecture Concepts, Technology and Design Thomas Erl, Prentice Hall, 2005. Full details here...
Suppose that you have found the perfect control that works with almost all the browsers you need to support, but suppose it has breaking functionality for a particular browser. How can you solve this problem?
While developing custom functoids in Visual Studio for BizTalk 2006 it is sometimes necessary to remove the functoid from the toolbox, particularly when it is not correctly implemented and causes Visual Studio to crash. This post describes how to reset the toolbox in Visual Studio 2005.
EPiServer does not exclude pages outside of publishing schedules when retrieved using the FindPagesWithCriteria method. Read more to workaround this issue.