Published 24 October 2013
      
        in archive
      
      
        with tags
        
          aspnet
          , 
        
           webapi
          
        
      
    
    You may have come across the error message No MediaTypeFormatter is available to read an object of type T from content with media type 'text/plain'. during your adventures in ASP.NET Web API. Tonight it was my turn to be faced with this bothersome little 'issue'.
    
      Continue reading …
    
  
  
    
    
      Published 18 September 2013
      
        in archive
      
      
        with tags
        
          urlrewrite
          , 
        
           angular
          , 
        
           iis
          
        
      
    
    AngularJS has the ability to use HTML5 routing, which means that rather than having your application using a hash (#) sign and then the route, it can instead get rid of the hash and still function as a Single Page Application. For example:
    
      Continue reading …
    
  
  
    
    
      Published 18 September 2013
      
        in archive
      
      
        with tags
        
          iis
          , 
        
           webapi
          , 
        
           cors
          , 
        
           webconfig
          
        
      
    
    If you're hosting your API on a different domain to your app, such as api.domain.com, you may be hitting into some cross-origin request roadblocks. In IIS, this is pretty easy to fix -- or well -- disable.
    
      Continue reading …
    
  
  
    
    
      Published 18 September 2013
      
        in archive
      
      
        with tags
        
          webapi
          , 
        
           json
          , 
        
           api
          , 
        
           csharp
          
        
      
    
    Sometimes when you call a WebAPI through the browser, you'll be served XML. This may make it easier to read, but it's really not helping us when all we really want is JSON. Putting the following snippet into the end of Application_Start() in Global.asax.cs will force your WebAPI application to always send JSON.
    
      Continue reading …
    
  
  
    
    
      Published 11 September 2013
      
        in archive
      
      
        with tags
        
          sublimetext
          , 
        
           emmet
          , 
        
           zencoding
          
        
      
    
    For those who don't know, Zen Coding -- or Emmet as it's now known -- is a set of plugins for text editors that allow for high-speed coding and editing in HTML, XML, XSL, and other structured code formats via content assist. (Thanks Wikipedia!)
    
      Continue reading …