TFS 2015 clone/import/export build definition between team projects

While exploring features of the new Visual Studio Team Foundation Server 2015 I found that it is not possible to reuse a build definition created in one team project into another team project. Since this is a feature that I am going to use frequently, well, every time I start a new project, this is a must have functionality. In this post I will give you a complete solution I’ve…

By Mirek on (tags: build definition, clone, tfs, VSO, categories: tools, infrastructure, code)

Remote Powershell on Azure virtual machine over internet

In this post I will show you a step by step guide to enable Powershell remoting functionality on the virtual machine running Windows Server 2012R2. Then I will show you how to start a powershell session from a machine over the internet using a secure connection. So the goal is to manage an Azure virtual machine with powershell remoting on a virtual machine. Since the virtual ma…

By Mirek on (tags: azure, Powershell, categories: azure, tools, security)

Automated UI testing in ASP.NET MVC5 using Selenium WebDriver

I would like to show you how easy it is to use unit test in Visual Studio and Selenium Web Driver to make automated UI test. The Plan The plan is simple: host your app, investigate given page, make assertions. The first problem is how to host our application from inside a unit test? I want to host app using current code not from external source which is already delopyed – post …

By Piotr on (tags: asp.net 4, mvc 5, Unit test, categories: code)

Pivot grid in WPF

Today I am going to show you how easy to achieve a pivot scrolling in wpf using scroll viewers and scroll bars. What we are going to achieve is presented on following picture The center and top part can be scrolled horizontally using bottom scroll bar (red rectangle). From the other side the vertical scroll bar affects center and left side part (orange rectangle). So when we sc…

By Mirek on (tags: pivot grid, WPF, categories: code)

Localization in ASP.NET Core 1.0 and MVC 6

Previous ASP.NET localization approach was quite old. It was just based on resources and there was nothing wrong with this but lot of projects uses other sources of localized texts (for example database). In ASP.NET Core 1.0 it’s completely rewritten! Configuring Localization middleware The localization is configured in Startup class, where we need to enable Localization middle…

By Dawid on (tags: asp.net core 1.0, localization, mvc6, categories: code)

Azure Active Directory B2B: How it works

B2B is based on invitation model which lets you enable access to your corporate applications from partner-managed identities. You can provide email along with the applications you want to share and send invitation to your partners, customers or anyone else who have account in Azure Active Directory. Azure AD sends them an email invite with a link. The partner user follows the l…

By Dawid on (tags: active directory, azure, b2b, categories: azure, infrastructure, code)

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)

Full responsive vs m-site approach

Nowadays there are more mobile devices than desktops and every mobile device can have different resolution and aspect ratio. That means that we need to come up with optimal solution to that situation. There are basically two main approaches: a website that can dynamically adapted to every screen size - full responsive or additional dedicated mobile version of every page – mobil…

By Piotr on (tags: ASP.NET, responsive design, categories: code, web)

Web API : One side object materialization

Recently I’ve been working on a api project where the requirement was that any data on the api service side is plain xml, stored in database as xml type column. No binding and object materialization is done on the server. However the client has to operate on clr objects. I am going to show you the solution I came to. I have chosen the Web API 2 as the service architecture, sinc…

By Mirek on (tags: Web API, web service, XML, categories: architecture)