Close

TFS Deploy Web App

Another post on using TFS (or DevOps) for easy reference. To build a web application and deploy it locally on IIS, you can use the following build and release definitions: In the Visual Studio Build step, use the following MSBuild Arguments to build a web deploy package: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation=”$(build.artifactstagingdirectory)\” It’s this web…

TFS Replace Tokens

When building a web application you can use AppSettings in you web.config file to configure (not hard-code) settings like database connection strings. Looking at the web.config file, I noticed variables were used like value=”#{CONNECTIONSTRING_RELATIECORRELATIE_DB}#”. The reason variables are used is because we want to change the value of variables per environment (DTAP), but how do…

Document REST service with Mermaid

For documentation of a REST service you can use a Javascript library called Mermaid (https://mermaidjs.github.io/). From the GitHub page, Mermaid is recommended as follows: Ever wanted to simplify documentation and avoid heavy tools like Visio when explaining your code? This is why mermaid was born, a simple markdown-like script language for generating charts from text…

Http 500 Service could not be activated

I’d like to share the solution to an issue that I’ve been searching for almost a day. I had a working logic app that suddenly returned the following error: The requested service, ‘https://…/Service.svc’ could not be activated. See the server’s diagnostic trace logs for more information. The information on the server error was very scarce.…

Authorizing REST service using an API key

It’s quite common to use an API key as a means to authorize a REST service. The first step is to add a message handler in the Application_Start event of Global.asax: protected void Application_Start() { GlobalConfiguration.Configure(WebApiConfig.Register); GlobalConfiguration.Configuration.MessageHandlers.Add(new AuthorizationHeaderHandler()); } The AuthorizationHandler.cs file is contained in the App_Start folder. On initialization the apiKey and apiKeyEnabled setting…

Cannot use WebDeploy 3.6 on IIS 10.0

I am using IIS 10.0 on Windows Server 2016. I found that option Deploy -> “Export Web Application” (when you right-click a web application in IIS) was missing. The reason for this is, that there have been some security related changes to web deploy. Before downloading and installing web deploy 3.6, you will have to…

Client certificate by example

I never really dealt with client certificate validation. Therefore I try to explain in this post how to order and install a client certificate for use in BizTalk. In this case the client certificate was needed by a housing corporation named Stadgenoot. The client certificate was not requested by Stadgenoot, but by a trading partner…

WCF Authenticate Preemptively

Normally when you send a request to a service that uses basic authenication, you will initially send a service request without authorization header. The service will respond with a Http 500 error and will send the client an authentication request. This all happens automatically. The client will send the service request again. This time an…