Category Archives: ASP.NET

Home / ASP.NET
122 Posts

ASP.NET’s built in CSRF (Cross-site request forgery) is pretty straight forward. You add a token to your views via an HTML Helper, and then decorate your controller actions with a specific attribute to validate the token on POST. There are many times, seemingly randomly, where users have invalid tokens on their requests. MVC throws a 500 error with an HttpAntiForgeryException. For legitimate users, this is not an optimal experience.

More Link

In continuing to build upon my previous project to get Angular2 working with Visual Studio 2015, I’ve been playing with routing and components.

While routing and components are very different when compared to Angular v1, it’s still pretty straight forward to get a basic application up and running.

More Link

In the solution that I’m migrating to ASP.NET Core, I have a domain project that uses System.Web’s HttpContext. Since System.Web is not part of .NET Core, I had to figure out how one gets the current user’s identity within a domain class.

More Link

With OWIN and .NET 4.6.x, it was pretty straight forward to enable SSL (TLS), and redirect all requests to the HTTPS end-point with Visual Studio’s tooling (IIS Express). It’s not quite as straight forward to accomplish this in .NET Core.

More Link

After using OWIN for months for basic OAuth authentication, it’s apparent that Microsoft is abandoning OWIN . This isn’t necessarily a bad thing. .NET Core is built on a similar structure as that which was implemented in OWIN. Essentially, we have a familiar middleware pipeline.

More Link

Some of Microsoft’s built-in code generation/tooling is really janky. One such example is the code generator that will produce service references and proxy classes from a SOAP WSDL definition. I’ve never liked this particular feature of Visual Studio. The service classes themselves don’t play nicely with injection, behave strangely with instantiation, scoping, singleton patterns, and are generally so .NET 1.1…

More Link

Since my foray into utilizing .NET Core to port an older CRUD app using Angular 1.x and Entity Framework 6.x, my first stumbling block is dealing with breaking changes between EF 6.x and newer versions of EF.

More Link

Last night, I was playing with the latest .NET Core tooling in Visual Studio 2015 and decided to create an Anuglar2 application. It is not a straight-forward process. Additionally, most tutorials that you will see floating around don’t deal with Angular2 RC4 (v.Latest). And the few that do either aren’t Visual Studio 2015 specific or aren’t targeting ES5 as required by IE11 or older.

More Link

My current single-sign server, that utilizes OWIN, does not store information regarding users’ identity. On the back-end, it makes LDAP queries to Active Directory to authenticate users and then makes additional LDAP queries to determine roles and authorization.

Since I’ve been playing with Azure lately, I wanted to re-tool this solution to allow toggling between a data-store for user identity information and Active Directory.

More Link