If you are building out a Sitecore MVC project or are just integrating Web API into your web forms project, you are going to want to expose the Sitecore Context to your controllers. An easy way to do this is to add a Route Pipeline in your httpRequestBegin section that will expose the Context. To do this, we will need to set up a patch config and a custom class that will actually expose the Sitecore Context.
Your.Framework.Pipelines.RoutePipeline - Custom Class
Once you link these up the Sitecore Context will be exposed. You can confirm that the pipeline is being added to the config by going to /sitecore/admin/showConfig.aspx.
I am a senior .NET engineer currently working at CARDFREE building out RESTful services to supports our mobile and web apps. My focus currently is around scalability, security, and ensuring our solutions are maintainable.
Originally from Boston, but have been living in Denver for several years now. In my spare time I try to keep pace with my energentic golden, hike and ski, and occassionally post something interesting.