I have a DNX application (on OSX with mono) with these things in the project.json

"dependencies": {
    "Microsoft.AspNet.Mvc": "6.0.0-beta4",
    "Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
    "Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
    "Microsoft.AspNet.StaticFiles": "1.0.0-beta4",
    "Kestrel": "1.0.0-beta4"
},
"frameworks": {
    "dnx451": {},
    "dnxcore50": {}
},

It works perfectly fine when I do dnx . kestrel, but I want to deploy it into IIS eventually.

I add this in my applicationhost.config and start iisexpress.

        <site name="api" id="2">
            <application path="/">
                <virtualDirectory path="/" physicalPath="\\psf\Home\api" />
            </application>
            <bindings>
                <binding protocol="http" bindingInformation=":1085:" />
            </bindings>
        </site>

But when I visit localhost:1085 I get the following error.

Couldn't determine an appropriate version of runtime to run.

[InvalidOperationException: Couldn't determine an appropriate version of runtime to run. See http://go.microsoft.com/fwlink/?LinkId=517742 for more information.]
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +303

[HttpException (0x80004005): Couldn't determine an appropriate version of runtime to run. See http://go.microsoft.com/fwlink/?LinkId=517742 for more information.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9931916
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101

System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

What am I missing? I've seen several references to this same error online, but cannot relate to any of them particularly.

Related posts

Recent Viewed