I want to try and add some override code that will perform a specific action if the user making the request is using a particular user agent. I have the two following methods that are overridden from the base ActionFilterAttribute  class. public override void OnActionExecuted(HttpActionExecutedContext…
Is there a way to check if an Expando object contains a property before interacting with it. For example, If i were to say var test = Expando.Something and Something didn't exist, it will throw an exception. How do i check to see if "Something"…
XML Serialization in C# works fairly well and is relatively easy, but XML itself makes life hard at times. JSON is always the best route to go, but when you have no option, you must deal with some badly formatted XML objects that do not…
Quite often when dealing with an API or some other external service, you will find that you get Unix timestamps returned to you or alternatively have to provide a timestamp in Unix form when sending a request back. Since you are going to be running…
  I recently hit an issue where i needed to change the name of an XML node. It ended up being a lot more complicated than I had expected it to be. node.Name is a read only field, so you can't take the simple route…
This tutorial will show you how to programmatically create a subsite in Sharepoint. This can be done a few different ways and if you have server access you may prefer to do this on the server side, but you can just as easily create one using the…
This can be done in the RouteConfig.cs. You can set the default route that will be used to display the home page. You can find this file in Project->App_Start->RouteConfig.cs. The config inside this file will let you set default home page for ASP.NET razor MVC…
When you want to access a session from an ashx file you will find that using context.Session["value"] , will not allow you to access the session variables from the previous file where the session was available from. This is expected behavior and based on some guides Ihave seen,…
When using Sql Server to insert records into a DB its a common requirement to be able to pull back the auto incremented Id that was generated for this row. Most solutions for this i have seen involve making a second query to the database…