Archive for the ‘Development’ category

Testing

November 7, 2016

testing

Web Development

April 26, 2016

spiders

Returning 401 HTTP Status Code on Authentication Failure in MVC 5 Web API’s

April 15, 2016

Was experiencing a problem that my AJAX requests were not receiving any 401 errors.

Turns out the security pipeline in OWIN and MVC 5 has changed and a custom filter attribute was no longer returning 401 and 403 status codes. Instead it returns a 200 status code and inserting the following information in the header.

X-Responded-JSON: {"status":401,"headers":{"location":"http:\/\/localhost:59540\/Account"}}

As a result JQuery does not detect the error and simply did nothing. Fortunately this great article by Kevin Junghans helped to solve this problem.

After reading this article I discovered the following the OWIN help:

“The LoginPath property informs the middleware that it should change an outgoing 401 Unauthorized status code into a 302 redirection onto the given login path. The current url which generated the 401 is added to the LoginPath as a query string parameter named by the ReturnUrlParameter. Once a request to the LoginPath grants a new SignIn identity, the ReturnUrlParameter value is used to redirect the browser back to the url which caused the original unauthorized status code.

If the LoginPath is null or empty, the middleware will not look for 401 Unauthorized status codes, and it will not redirect automatically when a login occurs.”

Hopefully this saves you the time I spent bumbling around in the deep, dark pit of despair.

-Dion

Server-side paging, sorting, filtering and grouping with the Kendo UI Grid and NHibernate

December 17, 2015

KendoNHIntegration3

Trying to integrate Telerik’s Kendo Grid with NHibernate and you keep getting a nasty exception? How to get server-side data operations working without experiencing the grouping error?

Find out more.

https://dionscher.wordpress.com/technical-articles/server-side-paging-sorting-filtering-and-grouping-with-the-kendo-ui-grid-and-nhibernate/

 

 

Multithreaded programming – theory vs actual

April 20, 2015

multithreaded programming

Five Pervasive Myths About Older Software Developers

November 21, 2013

Nice article on old vs young developers. Author addresses the issues directly in a no-holds, unprejudiced manner.

Five Pervasive Myths About Older Software Developers

 

 

NHibernate – beginning of the end?

August 2, 2013

Being a huge fan of NHibernate, I really hope the concerns of this article don’t come to pass.  But I too have noticed what I consider to be a fragmentation in NHibernate’s growth path. Libraries like the amazing and popular Fluent NHibernate in competition with Loquacious Configuration. A multitude of query methods – perhaps too many…? A less than complete Linq to NHibernate implementation. This article talks around doubts surrounding the future of NHibernate, largely due to it’s lack of contributor support.

The State of Entity Framework and NHibernate

http://weblogs.asp.net/ricardoperes/archive/2013/05/29/the-state-of-entity-framework-and-nhibernate.aspx

Having used Entity Framework 5 for the last while, I am almost impressed. I still loathe the designer and code-first is improving with every release. I think the biggest thing for me is how clean the Linq implementation is. Now, if only they could improve that performance….