IIS部署的ASP.NET 5 BETA 8站点到IIS会给出HTTP错误500.19 - 内部服务器错误 [英] IIS Deployed ASP.NET 5 BETA 8 site to IIS gives HTTP Error 500.19 - Internal Server Error
问题描述
我创建了一个新的ASP.NET5 Beta 8 Web应用程序。
我将其发布到我的本地文件系统,并将这些文件复制到我的服务器,这是一个Windows Server 2012 R2
在服务器的IIS 8.5中,我创建一个使用应用程序池的应用程序,该应用程序池使用Process Model - > Identity as LocalSystem。
,我指向复制的已发布应用程序的wwwroot子文件夹的路径
我的web.config
< configuration>
< system.webServer>
<处理程序>
< add name =httpplatformhandlerpath =*verb =*modules =httpPlatformHandlerresourceType =未指定/>
< / handlers>
< httpPlatform processPath =.. \approot\web.cmdarguments =stdoutLogEnabled =falsestdoutLogFile =.. \logs\stdout.logstartupTimeLimit =3600> ;< / httpPlatform>
< /system.webServer>
< / configuration>
直接在服务器上运行URL或在IIS中单击浏览
http:// localhost / WebApplication1
我收到以下错误
HTTP错误500.19 - 内部服务器错误
由于该页面的相关配置数据无效,因此无法访问请求的页面。
确定安装了哪个版本的.NET 4,它对应于.NET框架4.5.1
在我的project.json中我有
框架:{
dnx451:{}
},
发布时,我编译为Win CLR
当我去我的批处理文件夹中的部署目录我可以运行web.cmd web服务器,然后通过创建的端口访问我的网站。
http:// localhost:5000 /
,此网站正常工作。
如果我查看我的IIS服务器角色安装的组件
安装了ASP.NET 4.5。
应用程序池是正确的。
ASP.NET 4网站在IIS中使用相同的应用程序池正确运行
我的问题
1.为什么IIS会说web.config无效?
2.如何让ASP.NET 5 Beta 8网站在IIS中运行?
HttpPlatformHandler是一个先决条件,所以你需要安装它,
[已更新:对于RC2及更高版本,需要一个新模块而不是HttpPlatformHandler, https://github.com/aspnet/Announcements/issues/164 ]
I created a new ASP.NET5 Beta 8 Web Application.
I publish it to my local file system and copy those files to my server which is a Windows Server 2012 R2
In IIS 8.5 on the server I create an application that uses an app pool that uses Process Model -> Identity as LocalSystem.
and I point the path to the wwwroot subfolder of the copied published application
My web.config
<configuration>
<system.webServer>
<handlers>
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="..\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="..\logs\stdout.log" startupTimeLimit="3600"></httpPlatform>
</system.webServer>
</configuration>
Running the URL on the server directly or clicking browse in IIS
http://localhost/WebApplication1
I get the following error
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
I am using the default web.config from the Visual Studio 2015 ASP.NET 5 Beta8 Web application template so I could only think it's perhaps the .net version.
I used the MSDN method to determine what version of .NET 4 is installed and it corresponds to .NET Framework 4.5.1
In my project.json I have
"frameworks": {
"dnx451": { }
},
I compiled it as Win CLR when publishing
When I go to my approot folder in the deployment directory I can run the web.cmd web server and then access my website through the port created.
http://localhost:5000/
and this site works correctly.
If I view my IIS server roles installed components
ASP.NET 4.5 is installed.
Application pool is correct.
ASP.NET 4 websites run correctly in IIS using the same application pool
My questions 1. Why does IIS say the web.config is invalid? 2. How do I get a ASP.NET 5 Beta 8 site to run in IIS?
HttpPlatformHandler is a prerequisite so you need to install it,
[Updated: For RC2 and above, a new module is required instead of HttpPlatformHandler, https://github.com/aspnet/Announcements/issues/164 ]
这篇关于IIS部署的ASP.NET 5 BETA 8站点到IIS会给出HTTP错误500.19 - 内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!