在IIS上托管rc1-final-update1的问题 [英] Problems hosting rc1-final-update1 on IIS

查看:62
本文介绍了在IIS上托管rc1-final-update1的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从Visual Studio(在IIS express中)在我的计算机上运行它时,效果很好.但是,当我尝试将网站托管在服务器(WS 2012,IIS 8)上时,该页面将永远无法加载.

Works just fine when I run it on my computer from Visual studio ( in IIS express) . But when I try to host the website on my server (WS 2012 , IIS 8 ), the page takes forever to load .

我在日志中发现此错误:

I found this error in log:

C:\iis\beta\wwwroot>SET DNX_FOLDER=dnx-clr-win-x86.1.0.0-rc1-update1 

C:\iis\beta\wwwroot>SET "LOCAL_DNX=C:\iis\beta\approot\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin\dnx.exe" 

C:\iis\beta\wwwroot>IF EXIST C:\iis\beta\approot\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin\dnx.exe (SET "DNX_PATH=C:\iis\beta\approot\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin\dnx.exe" ) 

C:\iis\beta\wwwroot>for %a in ((null)) do (IF EXIST %a\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin\dnx.exe (
SET "HOME_DNX=%a\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin\dnx.exe"  
 goto :continue 
) ) 

C:\iis\beta\wwwroot>IF "" NEQ "" (SET "DNX_PATH=" ) 

C:\iis\beta\wwwroot>IF "C:\iis\beta\approot\runtimes\dnx-clr-win-x86.1.0.0-rc1-update1\bin\dnx.exe" == "" (SET "DNX_PATH=dnx.exe" ) 
Error: Unable to load application or execute command 'Microsoft.AspNet.Server.Kestrel'. Available commands: web, ef.
System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
   at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
   at System.Reflection.Assembly.LoadFile(String path)
   at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadFile(String assemblyPath)
   at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.Load(AssemblyName assemblyName, IAssemblyLoadContext loadContext)
   at Microsoft.Dnx.Runtime.Loader.PackageAssemblyLoader.Load(AssemblyName assemblyName)
   at Microsoft.Dnx.Host.LoaderContainer.Load(AssemblyName assemblyName)
   at Microsoft.Dnx.Host.DefaultLoadContext.LoadAssembly(AssemblyName assemblyName)
   at Microsoft.Dnx.Runtime.Loader.AssemblyLoaderCache.GetOrAdd(AssemblyName name, Func`2 factory)
   at Microsoft.Dnx.Runtime.Loader.LoadContext.LoadAssemblyImpl(AssemblyName assemblyName)
   at Microsoft.Dnx.Runtime.Loader.LoadContext.ResolveAssembly(Object sender, ResolveEventArgs args)
   at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)

这是我的project.json:

Here's my project.json:

    {
  "webroot": "wwwroot",
  "userSecretsId": "aspnet5-gplayweb-11fc9aea-7741-4cff-ba1f-fc74dfb7600b",
  "version": "1.0.0-*",

  "dependencies": {
    "EntityFramework.Commands": "7.0.0-rc1-final",
    "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
    "Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final",
    "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-rc1-final",
    "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-final",
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
    "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
    "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
    "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
    "Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final",
    "Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final",
    "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
    "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
    "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final",
    "Microsoft.Extensions.Logging": "1.0.0-rc1-final",
    "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
    "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final",
    "Microsoft.AspNet.Session": "1.0.0-rc1-final",
    "MySql.Data": "6.9.8"
  },
  "commands": {
    "web": "Microsoft.AspNet.Server.Kestrel",
    "ef": "EntityFramework.Commands"
  },

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

  "exclude": [
    "wwwroot",
    "node_modules"
  ],
  "publishExclude": [
    "**.user",
    "**.vspscc"
  ]
}

推荐答案

我通过从approot \ src \ website \中删除global.json解决了该问题.

I fixed the problem by deleting global.json from approot\src\website\ .

这篇关于在IIS上托管rc1-final-update1的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆