I am currently trying to deploy my ASP.NET 5 MVC application to a remote server and am having trouble getting it to run correctly with IIS.
My solution DNX SDK version is 1.0.0-beta8-15598.
I have packaged together this project using dnu publish --runtime active
and pointed IIS at the wwwroot folder.
My project.json looks like this
{
"webroot": "wwwroot",
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNet.Diagnostics": "1.0.0-beta8-15533",
"Microsoft.AspNet.Mvc": "6.0.0-beta8-15550",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta8-15520",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta8-15519",
"Dapper": "1.42.0",
"Dapper.SimpleCRUD": "1.8.7",
"Microsoft.Framework.Logging.Console": "1.0.0-beta8-15514",
"Microsoft.Framework.Logging.NLog": "1.0.0-beta8-15514",
"Microsoft.Framework.Configuration.Json": "1.0.0-beta8-15514",
"Microsoft.AspNet.Cors": "5.1.0-rc1",
"Dapper.Contrib": "1.43.0",
"NuGet.CommandLine": "2.8.6"
},
"commands": {
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://meep:5001"
},
"frameworks": {
"dnx451": { }
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"publishExclude": [
"node_modules",
"bower_components",
"**.xproj",
"**.user",
"**.vspscc"
],
"configurations": {
"Stage": { }
}
}
The error I get when I attempt to access the remote server in my browser is as follows
[FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)]
[InvalidOperationException: Unable to load application or execute command 'Microsoft.AspNet.Loader.IIS'. Available commands: web.]
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +303
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9931880
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
I am running Windows Server 2012 -- Windows 6.3.9600.
I am unsure how to proceed with solving this as I am unsure of the direct cause of the problem, aside from it not being able to load application or execute command 'Microsoft.AspNet.Loader.IIS'