I want to host my web app on IIS. But I get an Error all the time. HTTP 500.19 - Internal Server Error
Code: 0x8007000d
It says that config file is bad (web.config in my case)
What is wrong with it?
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\ServerApplication.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
<!--ProjectGuid: b5218e98-989b-4275-96f0-53c91a5f235a-->
It was an ASP.NET Core app, so after installing .NET Core Windows Server Hosting everything works just fine
Related
I'm trying to deploy a ASP.NET Core web API to IIS in Windows Server. I've followed this tutorial first to install IIS and deploy the API and then this other tutorial to configure the CORS policy.
I'm trying to fetch data from a React webpage that is hosted in the same server, opening it in Edge in the server itself. React works fine and the whole thing is tested in my own PC, so I guess the problem must be some IIS configuration.
After configuring the CORS I stopped getting the CORS error in React, so I guess I did that right, but now I'm getting a 503 error "aplication shutting down". I tried (unsuccessfully) setting up a log file. This is my web.config.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
<cors enabled="true" failUnlistedOrigins="true">
<add origin="http://localhost">
<allowHeaders allowAllRequestedHeaders="true">
</allowHeaders>
<allowMethods>
<add method="GET" />
<add method="POST" />
</allowMethods>
</add>
</cors>
<defaultDocument>
<files>
<add value="MyExe.exe" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
The server is a Windows Server 2022 freshly installed.
You can try open Windows Event Viewer, try to find the error about IIS, click to view the error details, maybe it will help you.
I am using .net core 2.2, and when deploying IIS, the following error occurs.
I added permission for the file and also installed .net core sdk.
(SDK 2.1.811, .NET Core Runtime 2.1.23)
What causes these errors?
web.config file
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\JbeAdminApp.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
</system.webServer>
When I want to go module section in IIS I got this error.
And I also installed URL rewrite module. I know there is problem in web.config file but I don't understand where is the problem.
here is my web.config file
web.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\RasaBack.dll"
stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"
hostingModel="InProcess" />
<aspNetCore processPath=".\RasaBack.exe" stdoutLogEnabled="false"stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
</system.webServer>
</system.webServer>
</location>
</configuration>
Please make sure you have installed Dotnet core hosting bundle.
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-3.1#install-the-net-core-hosting-bundle
To run the asp.net core site in iis you need to install the .net core hosting bundle and .NET Core Runtime.
you could download both the things from the below link based on your version:
https://dotnet.microsoft.com/download/dotnet-core
The error removed when I installed .net core husting bundle V3.1 showed me the full error.
And I see I have two aspNetCore
<aspNetCore processPath="dotnet" arguments=".\RasaBack.dll"
stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"
hostingModel="InProcess" />
<aspNetCore processPath=".\RasaBack.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
</system.webServer>
Then I removed on of those the error has gone.
This is the first time I have launched an ISS Windows Server 2016 and an ASP.NET application.
Any clues on what is needed to be done to get this app running?
Here is my web.config file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\Groliapp.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 06d4355d-1388-4f21-88d8-c0b4afb3c673-->
Usually when you do not have the .NET Core Runtime installed in your server, this error could happen.
Did you already install the .NET Core Runtime in your server?
In case you did not installed yet, here is the link to download.
https://dotnet.microsoft.com/download/dotnet-core/current/runtime
I am trying to deploy an Asp.net boilerplate app on azure and I have already deployed my backend and the Swagger application is working fine, when I try to also deploy the Angular frontend I keep getting this error: HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure.
I have found other threads discussing this problem, but since I am using the ASP.NET Boilerplate framework i do not have a .exe or .dll file that I can run to start the Web.Host project, not that I'm aware of atleast.
The logs in Kudu show this: Application '/LM/W3SVC/288745522/ROOT' with physical root 'D:\home\site\wwwroot\' failed to start process with commandline '%LAUNCHER_PATH% %LAUNCHER_ARGS%'.
It probably has something to do with those %LAUNCHER% variables not being found, I have found some other threads suggesting your should replace the LAUNCHER_ROOT [projectname].exe or [projectname].dll but I cant seem to find these in my project. This might be because of the way ASP.NET Boilerplate is built up.
This is my web.config:
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" requestTimeout="23:00:00">
<environmentVariables />
</aspNetCore>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
Error message indicates that the ASP.NET Core Module attempts to start the worker process but it fails to start. The cause of a process startup failure can usually be reviewed from entries in the Application Event Log and the ASP.NET Core Module stdout log. Both logs can be found on the Kudu/SCM site in d:\home\Logfiles. In your web.config file located in the wwwroot folder, enable stdout logs, as so:
Web.config sample:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\MyApplicationAssembly.dll" stdoutLogEnabled="true"
stdoutLogFile="\\?\%home%\LogFiles\stdout" forwardWindowsAuthToken="false" />
</system.webServer>
</configuration>
Please check the eventlog.xml and the stdout logs you have collected.
Reference: https://blogs.msdn.microsoft.com/waws/2018/06/10/troubleshooting-http-502-5-startup-issues-in-azure-appservice-for-asp-net-core-websites/
Additional troubleshooting methods for ASP.Net at
https://learn.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-2.2#troubleshoot-on-azure-app-service.
Hope it helps.