Below you will find pages that utilize the taxonomy term “Development”
Blog
Using (Table Storage) Bindings in Azure Functions
My post Using Triggers & Bindings in Azure Functions V2 drew quite some attention over the past months. But there is a lot more to say about them. Time for a small follow up 😁
Covered previously ⌚ In my previous post we covered relative simple things like writing to blob storage and putting messages on a Service Bus. But the bindings for Azure Functions are so much more powerful.
Blog
Azure App Configuration with .NET Full Framework
This post on using App Configuration using .NET Full Framework was based on a contribution by Steven Hack.
My last post Azure App Configuration: an introduction received a lot of good feedback. And one of those pieces of feedback was a question if it’s also possible to use App Configuration if you’re using Full Framework.
The short answer: yes, this is possible!
For the slightly longer answer: keep reading 🤓
Blog
Azure App Configuration: an introduction
Azure App Configuration is a powerful way to manage and store application configuration on a central location. Integrating it into for instance ASP.NET (Core) is pretty straightforward. This post gives you an introduction to Azure App Configuration and a simple example of how to integrate it in ASP.NET Core.
Creating an Azure App Configuration 🆕 Of course there are several ways to create a specific resource in the Azure Portal. One of the simplest is to go to the portal, open up App Configuration and click the Add button.
Blog
Azure Functions: binding to a property
Here’s a short post I didn’t want to hold from you. As you may already know I wrote a blogpost on Using Triggers & Bindings in Azure Functions. It handles quite a few nice possibilities of using triggers and bindings in Azure Functions (if I may say so myself… 😳). Fortunately, you learn something new every day. So I learned about Property Binding recently…
Property Binding Like in the HttpTriggerReturnBinding example in the functions-triggers-bindings-example GitHub repository, let’s say we have a model RequestModel that we’re receiving through a POST on an HttpTriggered Function.
Blog
Creating a custom JsonNamingPolicy
Probably there’s no need for me to say why .NET Core 3.0 is a big deal. There are enough articles on that. For a great write-up see Announcing .NET Core 3.0.
From the inception of the .NET Core project, we’ve added around fifty thousand .NET Framework APIs to the platform. .NET Core 3.0 closes much of the remaining capability gap with .NET Framework 4.8.
Introducing .NET 5
Next to adding this massive amount of .
Blog
Managed Identity – Part III
This post is part of a series on Managed Identity. For an introduction, see Managed Identity – Part I. For a post that shows you how to connect your application to different types of Azure resources using Managed Identity see Managed Identity – Part II. Stay tuned for future posts.
Introduction Elaborating on Part I and Part II, this blog post will show you how to debug your Managed Identity enabled application locally.
Blog
Managed Identity – Part II
This post is part of a series on Managed Identity. For an introduction, see Managed Identity – Part I. Stay tuned for future posts.
Introduction Elaborating on Part I, this blog post will show you how to connect your application to different types of Azure resources using Managed Identity.
To use the Managed Identity to actually connect to Azure Resources, you’re going to need the NuGet package Microsoft.Azure.Services.AppAuthentication. This package enables a service to authenticate to Azure services using the developer’s Azure Active Directory/ Microsoft account during development, and authenticate as itself (using OAuth 2.
Blog
Managed Identity – Part I
This post is part of a series on Managed Identity. Stay tuned for future posts.
Introduction Connecting your application to a resource like Storage or a SQL database used to involve a connection string. This isn’t very secure. These settings are available through the Azure portal. So they might get compromised.
With the introduction of Azure Key Vault, we got a way of separating these secrets from our application configuration. We can store them in a safe, secure place.
Blog
Dutch VS2019 launch event
We’re hosting a VS2019 Launch Event at the Betabit The Hague office. Join us for some Visual Studio 2019 goodness! And maybe even some swag… ?
Join us on April 2 for the launch of Visual Studio 2019. Learn about how Visual Studio 2019 is more productive, modern, and innovative, participate in live Q&As, and be the first to take the latest version for a spin.
https://visualstudio.microsoft.com/vs2019-launch/
The agenda is as follows:
Blog
Using Triggers & Bindings in Azure Functions V2
To start things off: yes. There’s some pretty decent documentation on all the available Triggers & Bindings in Azure Functions. Like this overview page. And you can also find documentation on specific bindings, like the Service Bus Binding. Nevertheless, I wanted to add to that documentation with some simple, real-world examples using triggers & bindings. So here goes.
Writing to Blob Storage Consider this very simple BlobTriggered Azure Function. It copies the triggering file into a different container in Azure Blob Storage:
Blog
So many new (.NET) goodies!
The people over at Microsoft have been working hard and have delivered a lot of stuff. That makes for a nice start after the holidays! So there’s a lot of cool stuff available to play with. I created some simple and easy to remember links for all of these goodies. Feel free to use and distribute these 🙂
Links to the goodies! The spec for .NET Standard 2.0 is complete (https://bit.
Blog
TypeScript build error TS2322
In one of the projects I’m currently working on we’re using an ASP.NET Core Web API with an Angular front-end. We’re using ADAL.js as an Azure Active Directory Authentication Library and ng2-adal for integration with Angular. To get the type declarations for all these packages in TypeScript we use The Future of Declaration Files.
Some time ago, our build server started acting up with the following message:
Type 'Observable<void>' is not assignable to type 'Observable<User>' The error occured in ADAL.
Blog
Security workshop: Hack Yourself First
My employer Betabit hosted a Hack Yourself First workshop by Troy Hunt on Monday 5th and Tuesday 6th of June. Because we are always looking to improve, this was a great opportunity to tune up our security skills. We had a great time, got terrified and most of all: we learned a lot.
First contact: a Twitter DM to Troy Hunt
You think you know security We’ve seen a lot of different subjects during the workshop.
Blog
Unable to attach remote debugger after Visual Studio 2015 Update 2
As the title states: I was unable to attach the remote debugger (for instance to an Azure Web App) after installing Visual Studio 2015 Update 2. I got an error with something about invalid memory access or something like that.
The solution is simple: install Remote Tools for Visual Studio 2015 Update 2. Go to the webite, pick your machine’s architecture (the x86 install won’t run on a x64 machine) and click download.
Blog
Exception with EF code first migrations
Just ran into an exception when running both update-database and add-migration in the Package Manager Console for an EF Code First project. The Exception read:
The type initializer for System.Data.Entity.Migrations.DbMigrationsConfiguration\'1 threw an exception.
The cause? An invalid config file for the project I was trying to run the tools for. So: if you run into this exception, check your configs 😉
Blog
Error saving Galileo Wiring App in Visual Studio
Last week I received my Intel Galileo board (windowsondevices.com) and I started ~playing with~ developing for it yesterday. I created a first test project, but it didn’t run. Visual Studio couldn’t find the Arduino header file, which was probably due to a missing NuGet package (the Galileo C++ SDK). I tried to save the project, because you need to before you can manage NuGet packages, but to no avail. Visual Studio served me a ‘The operation could not be completed’ error without any additional information.
Blog
Getting Bootstrap to work on Windows Phone 8
There are a couple of websites I manage that use Twitter Bootstrap*. These websites are fully responsive and work well on all devices. Or actually, almost all devices. The wrapping of columns in a container on a Windows Phone doesn’t work the way you’d want it out of the box. Windows Phone interprets device-width as the actual resolution size. Other mobile browsers use what the manufacturer (or browser vendor) has decided is the optimal viewport width.
Blog
Error: The Path ‘path’ is already mapped in workspace ‘workspace’
Just a quick little post today: I got the error “The Path ‘path’ is already mapped in workspace ‘workspace’” when I connected to a new Team Foundation Server and tried to map my workspace today. I had connected to a Team Foundation Services project a while back to get some shared code, but I already removed the workspace and the server binding. Even though Visual Studio didn’t see any other bindings, mapping my workspace to the same folder the previous TFS binding was mapped to served me this error.
Blog
Visual Studio 2012 crashes when opening an ASP.NET MVC project with a cshtml open
A rather long title for this post, but that’s exactly what happened: when I opened an ASP.NET MVC 4 project with a cshtml view open, Visual Studio would crash with the error messages seen on the right. This would only occur if the first project I opened had a cshtml file open. When I opened another (type of) project first and then opened a project with a cshtml file open, the problem did not occur.
Blog
How to add Next and Previous buttons to Twitter Bootstrap tabs
Just a quickie today: when working with Twitter Bootstrap tabs, like I am in my ASP.NET MVC 4 project, you might want to add Next and Previous buttons on the tabs to create something of a Wizard. Here’sa step by step overview of how I did this:
Add an ID to all the ListItem elements that are used for the tab navigation. For instance:
<ul class="nav nav-tabs" id="myTab"> <li><a href="#example" data-toggle="tab" id="xmpl">Example</a></li> .
Blog
How To: Call a generic method with a runtime type
Problem:
Developing a generic class that maps datasets, datatables and datarows from a legacy system to my domain model, I ran into an issue. I wanted to call a generic method with a runtime type. Lets say the method looked like this: public string DoSomething<T>(string param). Because I use reflection to iterate properties on a type, the type of the properties was dynamic and only known at runtime. I wanted to do something like this:
Blog
How To: Create an ActionLink with a Twitter Bootstrap icon in MVC4
Twitter Bootstrap is a… “Sleek, intuitive, and powerful front-end framework for faster and easier web development.” One of the nice things in Bootstrap is you can use icons from Glyphicons. To use these, you can simply use this markup <i class="icon-fire"></i> to get a nice fire icon.
Translating this into an ActionLink styled as a button in an MVC4 application would look something like the following:
@Html.ActionLink("<i class="icon-fire"></i> Invent fire", "fire", new { @class = "btn" }) Unfortunately, this renders as follows:
Blog
TIP: “Paste XML as Classes” in Visual Studio 2012
In the past, when you had some XML document that you wanted to translate into classes we had to create / generate a schema based on the XML file. Next, we had to generate a class based on the schema with an external tool. Not all too user friendly and somewhat time consuming.
In Visual Studio 2012 you copy the XML you want to create a class/classes for, place the cursor in a class file on the location you want the code to be added and select the following menu items: Edit – Paste Special – Paste XML as Classes.
Blog
Documents.Open returns null, running Word automation under ASP.NET on x64
When building an ASP application that generates Word documents, it was working fine on the local machine: A Windows XP installation with Office 2007. When we deployed it to windows 2008 (64 bit) and Word 2007 we saw that Documents.Open returned null. Other than this, there are no exceptions.
The code that returned the error (simplified):
Application app = new Application(); Document doc = app.Documents.Open(ref name); As it turns out, a 64 bit system stores temporary files in C:\Windows\Sys\WOW64\config\system\profile\Desktop folder.
Blog
Unhandled exception installing SQL Server 2008 R2 on a Windows XP / Windows 7 machine
When installing SQL Server 2008 R2 on a Windows XP (or, according to the comments, Windows 7) development machine that has been around for quite some time, I got an error stating an unhandled exception occured in the application (see image). The error showed up directly upon startup and read:
An error occurred creating the configuration section handler for userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings: Could not load file or assembly ‘System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ or one of its dependencies.
Blog
The Visual Studio 2010 Test Client for WCF services
When writing WCF services, most of us find ourselves writing quick test applications. To give you more time to do what a developer should be doing (adding business value to the project) the Visual Studio team added a WCF test client that can help you reach goals faster.
This is not a very difficult application, but it does the trick and is more than sufficient for simple testing. The WCF Test Client can be found at this location (without the ‘ (x86)’ for x86 machines): C:\Program Files (x86)\Microsoft\Visual Studio 10.
Blog
HowTo: Save a file from Silverlight using the SaveFileDialog
Saving a file from Silverlight using the SaveFileDialog, added in Silverlight 3, is easy. If you’re used to desktop development however, you might find yourself getting a SecurityException with the message ‘File operation not permitted. Access to path ‘xxx’ is denied.’. Here’s why:
In desktop development, you’re used to getting a filename from a SaveFileDialog. Next, you start doing whatever you need to be doing to the file, based on the filename.
Blog
HowTo: open all files from the Find Results window
Here’s a quick Visual Studio tip for you…
I frequently search for a specific text in my solution because I need to do something in all places where that text occurs. Today I found out how you can open all the files that are mentioned in the Find Results window.
Search for the text you’re looking for. In my case this is ITest*.
Open up the Search Results window and select all the records where the text was found.
Blog
HowTo: have Visual Studio open XAML documents in code view
Just a small post to start the new year… and let it be a good one!
When opening a XAML document in Visual Studio, it opens in split view by default. This might become annoying when you have a large XAML document, because all the content needs to be rendered before you can get some work done.
Here’s how you can have Visual Studio open XAML documents in code view:
Blog
Little-heard-of ASP.NET feature: app_offline.htm
Although the feature has been around since ASP.NET 2.0, I still meet people that don’t know and/or use app_offline.htm. Do you know (and use) the feature…?
When working on an ASP.NET web application, you should notify your visitors in a decent way that your application is down. There’s a nice default feature available for these purposes since ASP.NET 2.0. Somehow, however, this feature is not very well known and rarely used.
Blog
“AjaxControlToolkit is undefined”
Because we were still using an old Visual Studio 2005 solution which included a Web Site project, it was time to upgrade. We upgraded our Visual Studio 2005 solution to Visual Studio 2010 (and .NET 4.0), converted the Web Site Project to a Web Application Project and then, of course, the AjaxControlToolkit had to follow. I downloaded the latest build from their Codeplex site and updated the references in the different projects.
Blog
Visual Studio: Zero-impact Projects & Cutting/copying empty lines
Yesterday I remembered two Visual Studio options Sara Ford told about in a presentation of her I attended a while back. Changing them made me happy… 🙂
Zero-impact projects When I have to test something real quick, I tend to create a new project in Visual Studio and scribble some code to test whatever I want to test at that point. This causes my project directory to be filled with projects named WindowsFormsApplication14 or something like that.
Blog
Visual Studio 2010 and the web.config
While working with Visual Studio 2010, a new feature caught my eye that isn’t communicated (strongly) in the “What’s new” lists you can find online. As part of the Visual Studio 2010 supports multiple web.config files! Now we can create a separate web.config file for each configuration we have for our application. If you add a configuration through the configuration manager, you have the possibility to add a web.config file for the new configuration, too.
Blog
Microsoft DevDays ‘09, I’m attending!
Thanks to our friends at Microsoft (and their great BizSpark program) I will be able to attend DevDays ‘09! We won tickets because we updated our company profile and added projects at the Discover Metro site. Normally attending this kind of event is not available to young startups like ours, but now it is!
I’ll be seeing you @ The Hague next week 🙂
Blog
Finally, a way to preview your site in all (important) browsers
I just read this great article by Mark Voermans: Expression Web SuperPreview: Look how your site renders in various Browsers.
I don’t know about you guys, but I’ve been waiting for this for a long, LONG time. I’ll give it a go this afternoon and let you know what I think…
Update: This first beta version only allows you to preview your site in different versions of Internet Explorer. We will have to wait for the full feature set until the final release of this tool…
Blog
Fix available for IE8 asp:menu problem
I just read an interesting article on Bertrand Le Roy’s blog. The most important information:
It so happens that the menu control is making a bad assumption on what the default value for z-index should be. We debated this at length with the IE team, but it became clear as we did so that they were right and that we were wrong. We had to fix that.
So here it is, the patch for menu is out and you can apply it to build IE8-compatible ASP.
Blog
In this mode, command line arguments will not be passed to the executable
When trying to pass some command line arguments to a Console Application, I got the following message: “The current project settings specify that the project will be debugged with specific security permissions. In this mode, command line arguments will not be passed to the executable. Do you want to continue debugging anyway?” (see image)
I didn’t run in to this earlier, but yesterday it suddenly popped up. But I did change my zone security, so that might be of some influence… Apparently, this is because of the Debug in Zone settings you can find at the Security tab of your project properties.
Blog
Installing my laptop after a repair
I’m reinstalling my laptop after I got it back from a repair… EMPTY (grrr).
What tools shouldn’t I forget when preparing this laptop to be my development machine? Already have Visual Studio, SQL Management Studio, Office and the Windows Live tools installed… (and of course I have all kinds of tools at hand from my server like DebugView, Reflector and whatnot)
Blog
Clicking ‘Choose items’ on the toolbox crashes Visual Studio 2008
I’ve had my current installation for a few months now, and I’ve used it for development purposes. Today I suddenly encountered an error when trying to add items to the Toolbox. Visual Studio 2008 simply disappeared… No errors, no warnings, it just went away.
After some searching and a lot of trying, I found that deinstalling the PowerCommands for Visual Studio 2008 did the trick. I’m guessing that the installation of a service pack (for either Visual Studio or .
Blog
Nice new addition to ASP.NET
Scott Guthrie posted about a cool new ASP.NET server control: Chart. It can be used for free with ASP.NET 3.5 to enable rich browser-based charting scenarios.
Read more over here: https://weblogs.asp.net/scottgu/archive/2008/11/24/new-asp-net-charting-control-lt-asp-chart-runat-quot-server-quot-gt.aspx
Blog
Inline wrappers & Response.Redirect() == Error
While developing a page that was to be used through an inline wrapper, I got an error: “Validation of viewstate MAC failed”. This error can usually be resolved by disabling event validation, viewstate encryptionor viewstate for the MAC. In my case these solutions did not resolve the issue.
After some testing Response.Redirect appeared to be the cause. I changed the page so it doesn’t need the redirect any more, and the problem disappeared.
Blog
An inline wrapper and having too much on your head
We developed an ASP.NET page (A) to be wrapped in an existing PHP page (B) using an inline wrapper. After a few days in which both pages displayed nicely, our page (A) suddenly got displayed twice inside the existing page (B). And even weirder was that the postbacks of the first occurrence didn’t work, and the postbacks of the second were executed outside of the wrapper.
We had changed some stuff the night before, so I finally checked the file line by line against an earlier version.
Blog
StyleCop v4.3 now available
StyleCop version 4.3 was released last tuesday. A short summary of what version 4.3 brings us: Various bugfixes, including fixes for VS integration issues Rules documentation is included and integrated into VS “Show Error Help” New rules, see blogpostfor the rules Branding change from Source Analysis to StyleCop **Links
** StyleCop blog: https://blogs.msdn.com/sourceanalysis/
Release announcement on the StyleCop blog: https://blogs.msdn.com/sourceanalysis/archive/2008/08/19/stylecop-4-3-is-released.aspx
StyleCop 4.3 download: https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sourceanalysis&ReleaseId=1425
Blog
Cool tool: DebugView
Taken from the SysInternals website:
The SysInternals web site was created in 1996 by Mark Russinovich and Bryce Cogswell to host their advanced system utilities and technical information. Microsoft acquired Sysinternals in July, 2006. Whether you’re an IT Pro or a developer, you’ll find Sysinternals utilities to help you manage, troubleshoot and diagnose your Windows systems and applications.
One of the must-have SysInternals tools for a developer is DebugView.