0

I'm trying to run Thinktecture IDP v3 (https://github.com/IdentityServer/IdentityServer3) on Mac OS X with DNX beta4.

To do this, I'm using one of their examples: https://github.com/IdentityServer/IdentityServer3.Samples/tree/master/source/AspNet5Host

If I run the example on Windows, everything is fine.

On OS X, with Mono 4.0.1 and DNX beta4, when I run:

mono .../.dnx/runtimes/dnx-mono.1.0.0-beta4/bin/dnx.mono.managed.dll . kestrel

I get the following error:

[0x7fff74d46300:] EXCEPTION handling: System.DllNotFoundException: api-ms-win-core-file-l1-2-0.dll
[0x7fff74d46300:] EXCEPTION handling: System.EntryPointNotFoundException: ReadFile
[0x7fff74d46300:] EXCEPTION handling: System.EntryPointNotFoundException: LoadLibraryExW
[0x7fff74d46300:] EXCEPTION handling: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
Started

I'm trying to find out what api-ms-win-core-file-l1-2-0.dll is and what is asking for it. Mono? Thinktecture package?

My project.json is as follows:

{
  "webroot": "wwwroot",
  "version": "1.0.0-*",

  "dependencies": {
    "Kestrel": "1.0.0-beta4",
    "Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
    "Thinktecture.IdentityServer3": "1.5.0",
    "Microsoft.AspNet.Owin": "1.0.0-beta4",
    "Microsoft.Owin": "3.0.1",
    "Microsoft.AspNet.DataProtection": "1.0.0-beta4",
    "Microsoft.AspNet.Diagnostics": "1.0.0-beta4"
  },

  "commands": {
      "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000",
      "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5005"
  },

  "frameworks": {
    "dnx451": { }
  },

  "publishExclude": [
    "node_modules",
    "bower_components",
    "**.xproj",
    "**.user",
    "**.vspscc"
  ],
  "exclude": [
    "wwwroot",
    "node_modules",
    "bower_components"
  ]
}
ryan1234
  • 7,237
  • 6
  • 25
  • 36
  • You would not be able to share you getting this to work would you? – Madu Alikor Aug 07 '15 at 00:16
  • I put the IDP code we ended up using online at Docker Hub. https://registry.hub.docker.com/u/ryan1234/thinktecture-idp/. As a note I had to fork the Thinktecture.IdentityServer3.dll and System.IdentityModel.Tokens.JWT.dll to run on Mono. Hopefully those issues will get resolved this year. =) – ryan1234 Aug 07 '15 at 00:47

1 Answers1

1

AFAIK there is an incompatibility between Mono 4 and ASP.NET Beta 4. User either Mono 3.x and Beta 4 - or Mono 4 and Beta 5.

leastprivilege
  • 18,196
  • 1
  • 34
  • 50
  • The block was actually a dependence on crypt32.dll. After the ILMerge step of the build process (build.ps1), crypt32.dll seems to get bundled and that freaks Mono out. I rebuilt from source and skipped ILMerge step and manually included all dependencies and that seemed to work. – ryan1234 May 18 '15 at 22:11