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
<预><代码><配置><system.webServer><处理程序><add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/></处理程序><httpPlatform processPath="..approotweb.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="..logsstdout.log" startupTimeLimit="3600"></httpPlatform></system.webServer></配置>直接在服务器上运行 URL 或在 IIS 中点击浏览
http://localhost/WebApplication1
我收到以下错误
<块引用>HTTP 错误 500.19 - 内部服务器错误
无法访问请求的页面,因为该页面的相关配置数据无效.
我使用的是 Visual Studio 2015 ASP.NET 5 Beta8 Web 应用程序模板中的默认 web.config,所以我只能认为它可能是 .net 版本.
我使用了
当我转到部署目录中的 approot 文件夹时,我可以运行 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="..approotweb.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="..logsstdout.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屋!