Fluentbytes

The only source of knowledge is experience

Page 2 of 16

Optimizing your (Windows) docker images with multi staged Docker builds

Last week I visited Docker con 2017 where Docker announced a whole lot of new features, under which a new feature in the docker build command, called multi staged builds.

These multi staged builds are extremely convenient to create images that are of minimum size. I am mostly using Docker on Windows, but this feature works on any version of Docker. When using Windows images, you might have noticed they are pretty large in size. Making your image as small as possible makes a big difference. So I will show you, based on the example I have used multiple times, how to create an optimized image to run an existing ASP.NET MVC 4.x on Windows Server Core.

Continue reading

How to work around docker-compose DNS issue with docker on windows

When you create a new docker image that is part of a container composition that you want to run on one and the same host, you can run into the issue that the independent containers are not able to reach each other via DNS resolving.

So lets assume you have the following compose file where you want the web tier to be able to reach the database tier given the following compose file:

Continue reading

Fixing “HNS failed with error : Unspecified error” on docker-compose for Windows

The past few days I worked quite a lot with docker-compose on my windows machine and after something strange happened to my machine that crashed it, I was not able to start any containers anymore that had connectivity over the network with each other.

Every time I used the command-line docker-compose up, I would get a message telling me it failed to start the container. the full message I got was:

“ERROR: for web  Cannot start service web: failed to create endpoint aspnetblogapplication_web_1 on network nat: HNS failed with error : Unspecified error”

Continue reading

Testing web apps on Edge using CodedUI

Recently Microsoft added the capability to CodedUI to test on the Edge browser. For this they extended the cross browser playback capability. This uses Selenium under the hood. So the steps to make this work are as follows:

 

  • Install the plugin “Selenium components for Coded UI Cross Browser Testing” from the Visual Studio Gallery (found here)
  • Download the Edge driver that matches your windows 10 version (found here)
  • Install the driver to the following location : %ProgramFiles(x86)%\Microsoft Web Driver

And finally in the code you need to switch the browser you want to launch. You need to provide the following name to start edge:”MicrosoftEdge”

BrowserWindow.CurrentBrowser = “MicrosoftEdge”; 

And that is it!

Happy testing on Edge Smile

My VSLive Sessions

If you attended one of my sessions, I hope you enjoyed them. I had a great time.

czkn1fvw8aey3mm

For your reference you can find the PDF’s here and the accompanying demo code.

Continuous delivery on azure: A/B testing, Canary releasing and Dark launching

If you are more interested in Continuous delivery, you also might like my just published course at Pluralsight called “Building a Continuous Delivery Pipeline with TFS and Visual Studio 2015” which you can find here: https://www.pluralsight.com/courses/tfs-visual-studio-2015-implementing-continuous-delivery

My second session was on Micro Services and you can find the PDF here:

VSH11 Exploring Microservices in a Microsoft Landscape

And the final session was on building maintainable cross browser UI tests with either selenium or codedUI. The PDF can be found here:

VSH16 Writing Maintainable X-Browser Automated Tests

and you can find the demo’s here: Search google

Also if you want to learn more about CodedUI, you can also watch one of my two courses I build for Pluralsight here:Test Automation with CodedUI Pluralsight which explains in detail all that can be done with CodedUI and Testing Web Applications with CodedUI Pluralsight which is focused on testing web applications.

if you don’t have a subscription yet, you can watch it for free with the free trial

Hope you enjoyed it, if you have comments or feedback let me know!

Cheers,

Marcel

Devintersection sessions

Last week I presented two talks at Devintersection europe. My first talk was about Modern Application architectures and you can find the pdf of the deck here

the second session was on Cross browser testing of web applications using CodedUI. I also have the pdf of the deck available here

And here are the two demo’s I showed to build maintainable test automation using Page Objects and the concept of DAMP testing (Descriptive And Meaningful Phrases).

Search Google

MVC Music Store

Also if you want to learn more about CodedUI, you can also watch one of my two courses I build for Pluralsight here:Test Automation with CodedUI Pluralsight which explains in detail all that can be done with CodedUI and Testing Web Applications with CodedUI Pluralsight which is focused on testing web applications.

Hope this helps!

How to fix “Error: This access control list is not in canonical form and therefore cannot be modified. Error count: 1”

In my previous post about Deploying ASP.NET 4.5 to Docker on Windows I forgot to mention that you might run into an issue when running webdeploy.

Julian Perrott, commented on my post and asked if this is an issue. I think it is an issue and that the install does not complete correctly. But there is an easy fix for this as well. What you can do is add a small PowerShell script to your Docker image and run that after the first attempt to deploy the website. Then the next step is to run the script to fix the ACL’s and then again run web deploy. I have not yet tried this on the latest Windows server 2016 bits, but on the Technical preview 5 this worked like a charm.

You need the following script to fix the ACL’s:

This script doe nothing more then getting the ACL on the path and then re-apply it. this will make windows fix the ACL and make them in canonical form again.

You can add this to your dockerfile and make it part of your standard install of a website in your release pipeline.

So this does nothing more then adding the little PowerShell script to the container and then using that in the step after deploying your website

Hope this helps!

How to Fix Application insights Live Metrics stream on Azure Mobile Apps

In preparation for Tech Days 2016, I was working with my colleagues on the Techdays app and for this we also have a backend system. This system is running for some time now and we want to have better insights into the usage of the website and the mobile app.

One of the latest additions to application insights is the capability of Live Metrics, where you can see the current traffic coming into your website or API.

For this you can simply add a NuGet package, which is currently in pre-release, but works great.

Once you install the package and run the website, you will see the Live Stream tile light up in the Azure portal and when you click it you will see a couple of live graphs showing actual traffic on the site or API

Of course we wanted to host our backend very simply on Azure Web apps and for this specific purpose on Azure Mobile Services, Since that is what we use as the mobile backend of the application. But apparently there are some subtle differences that prevent AppInsights to work properly if it comes to Live Metrics.

Continue reading

Deploying ASP.NET 4.5 to Docker on Windows

At the moment of this writing you can search the internet on ASP.NET and docker and all you will find is how to deploy ASP.NET Core applications to a Linux docker container. Although I love the initiative of ASP.NET core, I do believe that ASP.NET 4.5 is something many of you know and love already and nobody talks about how we can leverage docker on windows to run this full version of ASP.NET

To get you started we need to have a Windows version that is capable of natively running docker. With natively running docker I mean that docker is build into the OS. So no use of docker for windows tools, since we don’t want Linux containers, we want to run windows containers! At this moment you can use Windows 10 Anniversary edition and Windows Server 2016 Technical Preview 5 to go through the steps that I describe here to get your ASP.NET 4.5 website running in a docker on windows container.

Continue reading

« Older posts Newer posts »

© 2023 Fluentbytes

Theme by Anders NorenUp ↑