[TypeLoadException: Could not load type ‘Microsoft.Dnx.Host.Clr.EntryPoint’ from assembly ‘Microsoft.Dnx.Host.Clr,Version=1.0.0.0,Culture=neutral,PublicKeyToken=adb9793829ddae60’.]@H_404_4@ System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags,PolicyLevel policyLevel,Exception appDomainCreationException) +303
[HttpException (0x80004005): Could not load type ‘Microsoft.Dnx.Host.Clr.EntryPoint’ from assembly ‘Microsoft.Dnx.Host.Clr,PublicKeyToken=adb9793829ddae60’.]@H_404_4@ System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9922864@H_404_4@ System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +90@H_404_4@ System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr,HttpContext context) +261
我知道主机架构有变化.但这是否意味着我们不能再使用IIS express了,或者仅仅是更新或配置更改的问题?
解决方法
>“Microsoft.AspNet.Server.IIS”@H_404_4@>“Microsoft.AspNet.Server.WebListener”
>“Microsoft.AspNet.Server.Kestrel”@H_404_4@>“Microsoft.AspNet.IISPlatformHandler
最后,在Startup.cs文件中,将以下内容添加到Configure方法:
> app.UseIISPlatformHandler();
(我假设app是您的IApplicationBuilder的名称,您可以相应地进行调整).
这会将新的IISPlatformHandler添加到管道并将流量定向到Kestrel服务器,从而绕过IIS和旧的Helios dnx主机.
您可以在Github的公告中了解此更改