Using Azure Active Directory application roles

In this post I’ll try to explain how we can build an MVC application that uses Azure Active Directory Application Roles for authorization. This kind of authorization is implemented using role based access control – RBAC. When using this kind of authorization we can grant permissions to roles, not to individual users or groups. The administrator can then assign roles to differen…

By Dawid on (tags: active directory, asp.net 5, azure, role, categories: azure, code, security)

Integration testing in ASP.NET MVC 6

In ASP.NET 5, Microsoft has produced a Nuget package called Microsoft.AspNet.TestHost which you can easily use to run your ASP.NET 5 in memory. We can use that feature of self hosted application to create integration tests. Creating integration test project After creating a new ASP.NET 5 solution open file and dependency for XUnit.DNX integration packages and the Microsoft.AspN…

By Dawid on (tags: asp.net 5, mvc 6, testing, categories: code)

Using TypeScript in ASP.NET 5

As we can read on the TypeScript it lets you write JavaScript the way you really want to. And guess what – you can do it in Visual Studio 2015! Visual Studio TypeScript support two different modes: File Scope: in this mode TypeScript files opened in Visual Studio Code are treated as independent units. As long as a file a.ts doesn't reference a file b.ts explicitly (either using…

By Dawid on (tags: asp.net 5, mvc, TypeScript, visual studio, vs, categories: code, web)

Multiple environments in ASP.NET 5

APS.NET 5 has introduced new environment variable called ASPNET_ENV. It allows us to control our application behaviour between multiple environments because it’s describing environment on which application is currently working on. We can put there whatever we want but typically it’s set to: Development Staging Production If we are working in Visual Studio 2015 then we can speci…

By Dawid on (tags: asp.net 5, environment, categories: code)