As far as I can tell, the issue is that when using IIS Express, it will copy the assembly files to a temporary location. When it does that, however, it doesn’t preserve the folder structure, so the trick we use to automatically add the realm-wrappers.dll to path doesn’t work. What you could do is to either use IIS and create an actual site that is hosted off of your project dir (i.e. not IIS express) or add the folder where realm-wrappers.dll is to the process PATH. The code would look something like:
var binPath = @"*path-to-your-solution*\WebApplication11\bin";
var wrappersPath = Path.Combine(binPath, "lib", "win32", IntPtr.Size == 4 ? "x86" : "x64");
var path = wrappersPath + Path.PathSeparator + Environment.GetEnvironmentVariable("PATH", EnvironmentVariableTarget.Process);
Environment.SetEnvironmentVariable("PATH", path, EnvironmentVariableTarget.Process);
On a side note, the Realm package added to your WebApplication project is not the same version as the one added to your ClassLibrary - you should remove Realm.Database and Realm.DataBinding and add only Realm.