在IIS中部署了一个ASP.NET5的站点,只有2个文件:
一个是bin文件夹中的AspNet.Loader.dll文件,一个是根目录下的Startup.cs。
运行时出现如下的错误提示:
[InvalidOperationException: Couldn't determine an appropriate version of KRE to run.]
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +361
[HttpException (0x80004005): Couldn't determine an appropriate version of KRE to run.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +541
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +122
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +731
如何解决这个问题?
添加一个web.config文件,在其中添加如下的配置:
<configuration> <appSettings> <add key="kre-version" value="1.0.0-beta1" /> </appSettings> </configuration>