Monthly Archives: March 2011

Handling ASP.NET AJAX client-side events

UPDATE: I have left this article here for historical reasons but you should now consider ASP.NET Web Forms as obsolete due to it not supporting unit-testing and the amount of data that is passed between client and server. I recommend … Continue reading

Posted in AJAX, ASP.NET Web Forms, Javascript, jQuery | Leave a comment

Dynamically generating client-side script in an ASP.NET page

UPDATE: I have left this article here for historical reasons but you should now consider ASP.NET Web Forms as obsolete due to it not supporting unit-testing and the amount of data that is passed between client and server. I recommend … Continue reading

Posted in ASP.NET Web Forms, C#, Javascript | Leave a comment

Simple ASP.NET AJAX timer example

UPDATE: I have left this article here for historical reasons but you should now consider ASP.NET Web Forms as obsolete due to it not supporting unit-testing and the amount of data that is passed between client and server. I recommend … Continue reading

Posted in AJAX, ASP.NET Web Forms, C# | Leave a comment

One-way WCF operations are not asynchronous

It’s easy to assume that service operation contracts marked as one-way are asynchronous but that’s not the case (there’s a phrase about assumptions which springs to mind). [OperationContract(IsOneWay=true)] void KeepAlive(string userId, string sessionId); A good example of when you might … Continue reading

Posted in C#, Multi-threading, WCF | Leave a comment

WCF hosting gotcha: AddressAccessDeniedException

I hit this problem as soon as I tried writing a self-hosting service using HTTP transport. Due to User Account Control (UAC) security in Vista and Windows 7,  if a host application is not running under an elevated account and … Continue reading

Posted in C#, UAC, WCF, Windows 7 | Leave a comment

WCF hosting gotcha: The using statement

I’ve seen countless WCF self-hosting code samples in books and on forums (including MSDN which really should know better) where a using block surrounds construction of a new System.ServiceModel.ServiceHost instance. However this is not good practice as I’ll explain. I’m … Continue reading

Posted in C#, WCF | Leave a comment