Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
820 views
in Technique[技术] by (71.8m points)

deployment - IIS Deployed ASP.NET 5 BETA 8 site to IIS gives HTTP Error 500.19 - Internal Server Error

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.

enter image description here

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

enter image description here

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

enter image description here

ASP.NET 4.5 is installed.

enter image description here

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

HttpPlatformHandler is a prerequisite so you need to install it,

https://azure.microsoft.com/en-us/blog/announcing-the-release-of-the-httpplatformhandler-module-for-iis-8/

[Updated: For RC2 and above, a new module is required instead of HttpPlatformHandler, https://github.com/aspnet/Announcements/issues/164 ]


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...