Skip to main content

Posts

Showing posts from April, 2017

TF246017: Team Foundation Server could not connect to the database

A colleague forwarded me the following error message: The problem occured when he tried to create a branch, but only on this specific project we had issues. Time to log on the TFS server and check the Event Log. There I found the following error message: DESCRIPTION: SQL Server Assertion: File: , line=951 Failed Assertion = 'IS_OFF (BUF_MINLOGGED, m_buf->bstat) || pageModifyType != PageModifyType_Contents || GetPagePtr ()->IsTextPage ()'. This error may be timing-related. If the error persists after rerunning the statement, use DBCC CHECKDB to check the database for structural integrity, or restart the server to ensure in-memory data structures are not corrupted. This error message brought me to the following Connect ticket: https://connect.microsoft.com/SQLServer/feedback/details/3005568/sql-server-2016-merge-statement-fails-when-running-db-in-simple-recovery-model I first tried to install all possible updates but no luck, the issue remained. Then I saw t...

Angular – Component Libraries

The new Angular(can’t call it Angular 2 anymore) ecosystem is still evolving. Control libraries start to appear. Here are some of the libraries I had a look at: (Don’t ask me which one I prefer, as with all control libraries they have their pros and cons you’ll have to learn to live with…) Angular Material Material Design components for Angular apps https://material.angular.io/ Remark: The Angular Material library for Angular >=2 is still rather limited. Don’t confuse it with the Angular 1 variant at https://material.angularjs.org/latest/ . . NG-Lightning Native Angular components & directives for Lightning Design System http://ng-lightning.github.io/ng-lightning/#/ Created by the Salesforce’s guys on top of Angular and Salesforce's Lightning Design System . TERADATA Covalent Covalent( https://teradata.github.io/covalent/#/ ) is a UI Platform that combines proven design language with a comprehensive web framework, built on Angular & Angular-M...

IT Manager, it’s a monkey job…

In my current job I’m active as a manager where I have a team of +20 people. My main focus is to guide these people through their career and help them grow into professional IT consultants. Sometimes I get completely overwhelmed by the questions, problems,little and bigger things, … that people keep asking me. My manager(the manager’s manager ) noticed it and shared the following article from Harvard Business Review with me; Management time: Who’s got the monkey? . Although from 1974(!) still as relevant today… Don’t forget the follow up article Making time for Gorillas (part of the same link ). Thanks Jörgen for the tip! And now I have to go as it is time to get the monkeys of my back…

Add extra NuGet Repositories through nuget.config

By default Visual Studio has one NuGet source registered out of the box, the official NuGet gallery at https://www.nuget.org/ . However I had to use a package that wasn’t hosted on the official NuGet gallery but instead could be found on MyGet.org( https://www.myget.org/ ). Problem was that I didn’t want to ask all developers to register an extra Package Source in Visual Studio. So what’s the alternative? The trick is to add a nuget.config file to your solution. From the documentation: The behavior of every NuGet command, whether issued from the command line, the Package Manager UI, or the Package Manager Console, is driven by the accumulated settings from any number of NuGet.Config files: + Project-specific NuGet.Config files located in any folder from the solution folder up to the drive root. These allow control over settings as they apply to a project or a group of projects. A solution-specific NuGet.Config file located within a .nuget folder in the ...

Angular 2 Pipes– args are not arguments :-)

Today I lost some time investing an issue with Angular 2. I was creating an Angular pipe using Angular CLI. The code that was generated for me was the following: Unfortunately I wrongfully assumed that the args keyword was refering to the arguments object we have in the JavaScript language. Turns out that this was a wrong assumption. Since Angular beta.16 the parameters are not passed as array to the transform() method anymore but instead as individual parameters: {{ myData | translate:'arg1':'arg2' }} export class TranslatePipe implements PipeTransform {      transform(value:any, arg1:any, arg2:any):any {         ... } I would suggest to the Angular CLI team to change the name of the argument, because the args name causes confusion. Or is it just me?

Use Swagger-UI to test your Open API

In case your REST api exposes an Open API specification document, but you didn’t integrate Swagger UI to allow developers to browse and test your API, they can still use the Swagger-UI capabilities by directly browsing to http://petstore.swagger.io and put the url in the box at the top of the page. Alternatively, they can add the url of the service to the end with ?url= such as http://petstore.swagger.io?url=https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/api-with-examples.json .

ASP.NET Core Web Deploy–XML Documentation files are not copied

After deploying our ASP.NET Core application using Web Deploy, we noticed a problem with our Swagger integration through SwashBuckle . Normally SwashBuckle can integrate documentation in your Swagger UI by extracting and reading the XML comments added to your code. Problem was that when this XML isn’t copied Swashbuckle throws an exception making our whole API unavailable. Some research showed that the problem appeared after migrating from the project.json format back to csproj, after which the <DocumentationFile> was no longer automatically copied to the output folder during the build or publish process. The solution I used was to add the following snippet to your csproj:

TFS Release error - WinRM cannot complete the operation.

After creating a release pipelin in Team Foundation Server, I got the following error during deployment: Connecting to remote server failed with the following error message : WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM firewall exception for public profiles limits access to remote computers within the same local subnet. For more information, see the about_Remote_Troubleshooting Help topic. As the error mentions first thing to check if I can use WinRM to invoke Powershell remotely. Therefore login on the target server and execute the following command: winrm quickconfig I said yes to apply the suggested changes And indeed, no exception was configured on the firewall to allow access from remote computers. The winrm quickconfig did all ...

ASP.NET Core 1.1 –Error in Response Caching Middleware

After putting a first version of our ASP.NET Core application into acceptance, we got a strange bug back. Sometimes after a cold start, users mentioned that the dropdown lists inside the application were empty. The application is using the Response Caching middleware to prevent having to fetch those lists over and over again from the database. When looking at the server logs, we found the following error message: exception": "System.ArgumentException: An item with the same key has already been added. Key: \r\n at System.ThrowHelper.ThrowAddingDuplicateWithKeyArgumentException(Object key)\r\n at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add)\r\n at System.Collections.Generic.Dictionary2.Add(TKey key, TValue value)\r\n at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.FrameResponseHeaders.AddValueFast(String key, StringValues value)\r\n at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.FrameHeaders.System.Collections.Generic.I...

Canvanizer

Last year our CEO gave a session about ‘Business Model You’ , or how to create your personal business model canvas. I really liked the session and how it made you think about your strenghts, weaknesses and the value you create for your company and customers. I’m still using this approach today. Last week I found Canvanizer , a free tool that simplifies the creation of a Business Model canvas.

Using the Visual Studio 2017 Offline Installer

Visual Studio 2017 offers a new installation experience with better modularity, a smaller footprint and quicker results. As a consequence, you no longer have a big ISO file containing all possible components, instead you get a small exe and all other files are downloaded on the fly. Works great unless you need to install Visual Studio when you don’t have Internet access. An offline installer can be created by following the steps as described here: https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio Afterwards you can copy the generated offline installer(some executables and a large list of packages) to the location where you want to use it. What is really important is that you first install the provided certificates(they are in the Layout\Certificates folder). The certificates don’t have a password, so just keep clicking next until the installation completes. If you don’t install the certificates first, we noticed that the inst...

Angular CLI–Include a static html file

While integrating OIDC into my Angular app, I had to add a separate authentication page(originally named auth.html). However after bundling and serving my application using ‘ng serve’ I noticed that I couldn’t reach my ‘auth.html’ file and I got an error message instead… The solution was obvious, any extra files you want to include should be added to the assets section inside the angular-cli.json file:

Azure API Management–Mock your service

A nice addition to Azure API Management is the mock-response policy. It allows developers to call your API without invoking the real backend service. Here are the steps involved to configure mocking from the Azure Portal: Browse to the Azure Portal Open an API Management instance. Click on APIs. Click on an API Then, for the scope of either All operations or any particular operation, open the Inbound processing editor. A new tab titled Mocking is now available. Change the Mocking behavior to Static responses and choose a Response from the list

Visual Studio 2017–.editorconfig

Visual Studio 2017 adds support for .editorconfig files within projects to help developers define and maintain consistent coding styles between different editors and IDEs, which can be useful for large development teams looking to maintain a consistent style across their code base. Teams can configure convention preferences and choose how they are enforced inside the editor (as suggestions, warnings, or errors). The rules apply to whatever files are in the directory that contains the EditorConfig file. If you have different conventions for different projects, you can define each project’s rules in different EditorConfig files if the projects are in separate directories. More about the EditorConfig project: http://editorconfig.org/ Easiest way to get started is by installing Mads Kristensen's EditorConfig extension , which can be downloaded from the Visual Studio Marketplace and will provide full autocompletion, syntax highlighting, and much more. Remark: You don’t need th...

#MakeWhatsNext–A cry out for more diversity in IT

I find it really unfortunate how little diversity there remains in the IT world. An era ago there were more women in IT than today! Something has to change… We all play a role to change this and education will be one of the key pillars. Time to support #makewhatsnext …

Avoiding seagull architects

During one of my trips to work I was listening to a DotNetRocks episode with Mark Seemann(this one to be precise: http://dotnetrocks.com/?show=1418 ). In this episode Mark mentioned a ‘seagull architect’: A seagull architect swoops in, poops out a lot of powerpoints, then flies off to let others implement it, evolve it, and solve the real problems. This term comes from a book called Behind Closed Doors – Secrets of Great Management , a book that I immediatelly added to my reading list.

TFS 2017 - VS402642: Found a backup job running against Tfs_DefaultCollection database

Last week during a TFS upgrade we noticed that the upgrade for one of the collections failed with the following error message: VS402642: Found a backup job running against Tfs_DefaultCollection database. Wait for the backup job to complete and then rerun the failed collection job from the Status tab Before starting the upgrade the sys admins already configured the backup jobs which intervened with the upgrade that was going on. We were first afraid that we had to restart the whole upgrade procedure but it turns out that the TFS upgrade procedure is a lot more robust. As we were able to upgrade all the other collections and the configuration database, we had a working Team Foundation server system available. Only this one collection was missing. To fix it, we first disabled all configured jobs inside the SQL Server instance. Next step is to rerun the upgrade procedure for this collection: Log in on the Team Foundation Server application tier Open the Team Foundati...

Team Explorer is back

Visual Studio 2013 and before had a seperate installer for Team Explorer. This allowed non-developers to access Team Foundation Server and all it’s functionality without the need to install a Visual Studio version. In VS 2015, Microsoft did not release a standalone Team Explorer but pointed customers to the free Express SKUs and Community editions, which included Team Explorer functionality. This week with the Visual Studio 2017 Update release , the standalone Team Explorer installer is back. This is a free download for non-developers who connect to Team Foundation Server or Visual Studio Team Services. Remark: Note that you probably still need a CAL(client access license).

Manual install of the Java JRE

Today I had to install the Java JRE on a server to be able to use ElasticSearch. Unfortunately I couldn’t install any software that allowed me to extract and run the tar.gz file on the server. Here is my workaround: Download and extract Start by downloading the Java 8 Server JRE . Once downloaded, unzip the tar.gz file. You’ll get a tar file. That tar file should be unzipped again. The output of this second unzip operation was a set of binaries and executables. Copy these files over to a file share on the target server. Installation Create a folder C:\Program Files\Oracle Java Server on your server. Browse to the content of the file share.  Go one level deeper e.g. jdk1.8.0_XX (where XX is the current update version) and copy this content to the new folder on your server. Set JAVA_HOME environment variable Finally we need to set an environment variable to point to our new Java installation: Open the System Properties. Click the Adva...

Reporting Services 2014 upgrade error

After upgrading to SQL Server 2014, we encountered the following issue while configuring the Reporting Services: When we tried to restore the Reporting Services Encryption key, it always failed. Inside the error logs we found the following information: The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is ‘163’. The expected version is ‘162’. (rsInvalidReportServerDatabase). A quick search on the web brought us to the following post: https://blogs.msdn.microsoft.com/sql_server_team/upgrading-to-sql-2014-report-server-version-mismatch/ The problem can happen when you upgrade from a SQL 2012 SP2 server with CU5 or later, the database will have a higher version number than what SQL 2014 expects. Luckily there was already a solution out there. I asked the server team to upgrade to SQL 2014 CU7 after which the issue was gone…