ASPNETCORE 2.0 Identity – Redirect URL signin-* Returns 404

When creating an ASP.NET Core web application using the web app template in VS 2017 preview, a web application with ASP.NET Core 1.1 is scaffolded. Adding external authentication providers following this or this instruction works like a charm. But then, after migrating to ASP.NET Core 2.0, the redirect URL getting the user from the external auth provider back to the web app (i.e. /signin-microsoft, /signin-google, /signin-facebook etc.) stopped working and resulted in a 404.

Read More »

Xamarin: Failed to create JavaTypeInfo for class … due to System.NullReference Exception

In my Xamarin\Android project, I wanted to use a WebView and add a JavascriptInterface to enable communication between my app and the JavaScript inside the WebView. I found an example here which was quite easy and straight forward. To explore things a little bit more, I wanted to add a JavaScript-callable method that accepts a parameter of type System.Object, call it with random objects from JavaScripts and see what these JavaScript objects transform to in the .NET world.Read More »

Parse Date From String In JavaScript

Suppose you have a string representation of a date, e.g. “2015-05-15T22:43:35.0962104+02:00” or “5/15/2015”, and you need to parse that string into a JavaScript Date object. Here’s how to do it:

// Parse string into the number of milliseconds since January 1, 1970, 00:00:00 UTC.
var ticks = Date.parse("5/15/2015");

// Create an instance of Date using the number of milliseconds.
var date = new Date(ticks);

// Check the value of the Date instance 
// yields "Mon Oct 05 2015 00:00:00 GMT+0200 (W. Europe Daylight Time)"

In-Memory Code Generation at Run-Time With .NET – Part 5 – Loading

This article is split into 5 posts.

  1. Introduction
  2. Templating Engines
  3. Code Generation From Source
  4. Code Generation From Model
  5. Loading

Read More »

Fix Visual Studio 2013 Razor CSHTML Intellisense in Class Library or Console Application

sdeu's Blog

I tried to use a .cshtml file and the razor syntax in a console application. I was able to build the project, but the intellisense and the error tab complaint about “The name ‘Model’ does not exist in the current context“:


The usual fixes, like throwing in a web.config, didn’t work. But then I found a fix to solve that problem. Here are the steps:

  • make sure you have the Microsoft ASP.NET MVC nuget package and its dependecies installed
  • clean and build your project, close your .cshtml-files
  • copy the following DLLs from Debug (or the mode you’re in) right to the bin folder
    • Microsoft.Web.Infrastructure.dll
    • System.Web.Helpers.dll
    • System.Web.Mvc.dll
    • System.Web.Razor.dll
    • System.Web.WebPages.Deployment.dll
    • System.Web.WebPages.dll
    • System.Web.WebPages.Razor.dll


  • open your .cshtml file
  • it should work

Reason: I guess it’s because in a normal web project there is only a bin folder, no Debug or Release. Visual Studio seems to look directly into that folder for…

View original post 39 more words