ServiceStack 4 HTTP Utilities: Functional Contract Testing ServiceStack 4 comes with some really great new tools for accessing an HTTP resource using a fluent syntax. They make a great addition – sometimes the JsonServiceClient (often just called the C# client) is a little too smart! For instance, let’s say you’ve published a specification saying how … Continue reading
Tag Archives: c#
ASP.NET/MVC Web Security Basics: CSRF
Cross Site Request Forgery, which is sometimes known by the acronyms “XSRF” or “CSRF”, is a category of attacks against a web site which can be very effective – when applications are vulnerable, it’s possible to create real problems. A common example of CSRF in an online banking application can cause a bank account holder … Continue reading
JavaScript client for talking with WCF server with WebSockets binding
This blog entry is a repost of an answer I wrote at programmers.stackexchange.com. If you are looking for a JavaScript client for talking with WCF server with WebSockets binding, you might take a look at these two: SignalR has a JavaScript API. SignalR helps build asynchronous scalable web applications with real-time persistent long-running connections. Scott Hanselman wrote … Continue reading
When to use exceptions, vs. when to code defensively?
This blog post is a repost of an answer I wrote at programmers.stackexchange.com. To answer the question of which is considered better practice, between exceptions and coding defensively: In .NET, its common practice to avoid the overuse of Exceptions. One argument is performance: in .NET, throwing an exception is computationally expensive. Another reason to avoid … Continue reading