All Questions
545
questions
116
votes
22
answers
165k
views
IIS: Handler "aspNetCore" has a bad module "AspNetCoreModuleV2" in its module list
I used angular .net core 2.2 template to build an application. In localhost working fine, When I host to IIS I'm getting this error. I'm using IIS 10 to host the application.
Error,
HTTP Error 500.21 -...
72
votes
13
answers
91k
views
.NET Core app unable to start in IIS due to ErrorCode = '0x80004005 : 80008083
I have a .NET Core application. It runs locally with VS2017 and Kestrel. It runs locally under IIS. However, on the server it fails to start with a 502.5 - Process Failure message.
In the event logs ...
36
votes
1
answer
31k
views
appsettings.json vs appsettings.{Environment}.json in .NET Core apps
I am new in .NET Core and as far as I see from my search on the web, appsettings.Development.json is used for development config while developing the app and appsettings.Production.json is used on the ...
28
votes
3
answers
20k
views
.net Core on Windows vs Linux
ASP.Net Core runs on both Windows and Linux Docker containers. Considering Linux hosts are cheaper than Windows hosts, what is the benefit of running your app on IIS/Windows vs Nginx/Linux if one ...
28
votes
5
answers
51k
views
.NET Core publish to IIS - HTTP Error 502.3 - Bad Gateway - The specified CGI application encountered an error and the server terminated the process
I'm trying to publish to IIS a .NET Core ASP.NET Website I upgraded from RC2 to RTM.
As a sanity check, I was successfully able to publish the template/sample "ASP.NET Core Web Application (.NET ...
25
votes
5
answers
17k
views
HTTP Error 500.19 with Error Code 0x8007000d visual studio 2017 while deploying .net core application
I created default .net core application using visual studio 2017 and am trying to publish it, The application works perfectly when I start it with visual studio 2017, IIS Express. But when I publish ...
23
votes
2
answers
15k
views
Keep ASP.NET core app running all the time in IIS
I am hosting an ASP.NET Core (2.2) app in IIS.
The app is using a custom app pool with below settings:
.NET CLR version: No Managed Code
Start Mode: Always Running
Idle Time-out (minutes): 0
My ...
22
votes
6
answers
34k
views
Could not find 'aspnetcorev2_inprocess.dll'. Exception message
I'm trying to publish an asp.net core v3 app to run under IIS. I created a virtual directory, converted to application. It has it's own IIS app pool that is setup with CLR: No Managed Code, 32 bit:...
20
votes
8
answers
17k
views
Microsoft.AspNetCore.Antiforgery was not found
I'm deploying a asp.net core 2.0 website to IIS 10.
I've made sure that my app is using the correct configuration for ISS in the program.settings file.
public class Program
{
public static void ...
19
votes
4
answers
62k
views
ASPNETCoreModule not installed with .NET Core SDK
I installed VS 2017 along with .NET Core SDK on Windows 10. But it did not install ASPNETCoreModule as shown in figure 2 below. I thought .NET Core SDK should have installed it implicitly - and one ...
18
votes
5
answers
7k
views
Check if hosting server is IIS or Kestrel at runtime in aspnet core
I'm currently running my application under either Kestrel (locally) or IIS InProcess (production).
return WebHost.CreateDefaultBuilder(args)
.ConfigureKestrel(options => options....
17
votes
2
answers
12k
views
Enable file logging on IIS for serilog
I want to enable file logging on IIS to resolve an issue locally on IIS. Following is the code I am using. It works when I run on visual studio and logs to a file but not when I deployed to IIS. ...
16
votes
5
answers
26k
views
The Module "aspnetcorev2.dll" failed to load
Recently I tried installing ASP.NET Core/.NET Core: Runtime & Hosting Bundle version 2.2 on a machine running Windows Server 2008 R2 SP1. However, after installing IIS stops working and gives 503 ...
13
votes
2
answers
17k
views
Run ASP.NET 5 (MVC 6) using .NET Core on IIS
I have just created a quick ASP.NET 5 MVC 6 app on Visual Studio.NET 2015 RC and would like it to run on my IIS web server on Windows 7.
Normally, when I create a website on IIS, I need to choose an ...
13
votes
1
answer
5k
views
When hosting .NET core web app in IIS, what are the pros and cons between "In process" and "out of process" hosting model
When hosting a .NET core web application in IIS, you can choose between in process and out of process hosting model.
Except for better performance by using in process, what are some pros and cons ...
13
votes
1
answer
8k
views
IIS Express vs dotnet run [duplicate]
Actually I understand that IIS Express is lightweight development server. From the other side "dotnet run" runs the application as a console application and binds it to random port.
But what is the ...
12
votes
1
answer
3k
views
Dotnet core + (plus) sign in Web API routing
I work on web API project in the dotnet core and check user mobile number exists check.
[Route("api/[controller]")]
public class UserController : Controller
{
[HttpGet]
[Route("mobile/exist/{...
12
votes
3
answers
7k
views
Will IIS recycle the asp.net core process?
I need to run long running background tasks in my asp.net core application.
I know of Azure Webjobs and other out of process techniques but I'd rather keep the solution simple and runs those tasks ...
11
votes
2
answers
17k
views
Asp.Net Core Windows Authentication Not Working in IIS
Asp.Net Core doesn't seem to recognize the user from the call context?.User?.Identity?.Name when windows authentication is enabled and running in IIS Express or IIS.
Desired behavior: Enabling both ...
11
votes
1
answer
5k
views
ASP.NET Core 2, IIS AppPool crashes and stops
I've just updated a web app to ASP.NET Core 2.0 running on IIS 7.5 on Windows Server 2008 R2. Since upgrading the app randomly crashes and leaves it with a 503 Service Unavailable response. It can run ...
11
votes
0
answers
1k
views
ASP.NET Core websites gets unresponsive
I have two sites running on my development machine for the last 8 months or so. Both sites use ASP.NET Core, and both are running on Kestrel behind IIS.
During the last couple of weeks, the sites ...
10
votes
2
answers
8k
views
Confusion: ASP.NET Core 2 is not managed code, but what is the ASP.Net Core Runtime for?
Regarding Microsoft documentation here in the IIS in the Apppool we can set "Not managed code" for our ASP.NET Core 2 App because the ASP.NET Core 2 app does not need a CLR:
This is confusing to us ...
10
votes
6
answers
25k
views
The breakpoint will not currently be hit - No executable code is associated with this line
I have a problem to debug my ASP.NET Core 2 application. Suddenly all breakpoints in application cannot be hit.
The breakpoint will not currently be hit. No executable code of the debugger's target ...
10
votes
1
answer
12k
views
.Net Core Cookie Authentication Not Working When hosted in IIS
When running the application standalone (just kestrel server running on a specified port in my case :3001) I can login (creating an auth cookie) and use my session without issue to make subsequent ...
10
votes
3
answers
27k
views
.NET CORE 3.1 on Azure Web Sites: 500.37 ANCM Failed to Start Within Startup Time Limit
I have .NET Core 3.1 API which is deployed in Azure web application service. I had trouble running the application in Azure because of the error 500.37 ANCM Failed to Start Within Startup Time Limit. ...
10
votes
2
answers
4k
views
.NET Core / Kestrel Application is shutting down without reason
An existing setup where .net core (2.2) apis are hosted under IIS 7.5 ran smooth and nice so far.
Suddenly I experienced that the logs hold the message Application is shutting down... without any ...
10
votes
3
answers
5k
views
Implemented IHostedService in an asp.net core app, How to run it without the first request on IIS?
I've implemented IHostedService in an asp.net core website. It works great but the problem is that I want it to be started when the hosting server boots up or the IIS service restarts but it won't ...
9
votes
2
answers
9k
views
Prevent IIS from Idle Timeout when Running Background Tasks
In our ASP.Net Core Web API, we have used Hosted Services to perform some background tasks. Sometimes it is possible that these background tasks to take a long time to complete (about an hour). ...
9
votes
1
answer
15k
views
Can you set request timeout in asp.net core 2.0 hosted in IIS from C# code?
Is there a way to set requestTimeout from C# instead of needing to set requestTimeout in the web.config?
asp.net core 2.0 hosted in IIS
<?xml version="1.0" encoding="utf-8"?>
<configuration&...
8
votes
2
answers
9k
views
Dotnet Core publish to IIS from Mac
I want to publish my dotnet core app to IIS from mac. I use VS code for code writing and Dotnet Core 1.1 for publishing to local directory. (for example: bin/release/publish). There are compiled my ...
8
votes
1
answer
8k
views
dotnet publish with gitlab-ci for dummies
I am trying to setup ci with gitlab-ci. And I have a few questions about it.
It looks like there is no rollback mechanism on gitlab-ci. So should i care about rolling back if deploy stage fails?
I'am ...
8
votes
3
answers
17k
views
ASP.NET Core fails to run under IIS: HTTP Error 500.0 - ANCM In-Process Handler Load Failure
I just upgraded my web application from ASP.NET (Framework) MVC to ASP.NET Core 2.2. The application runs fine under IIS Express, however as soon as I try to run it under IIS it gives the generic ...
7
votes
2
answers
6k
views
DotNetCore 1.0.1 WindowsHosting Installation Fails for IIS Windows Server 2012R2
Things I tried:
Running admin
Turning off UAC
Restarting machine
I am supposed to be admin on the machine
I have the following error log:
[0A48:124C][2016-09-16T13:28:19]i300: Apply begin
[0A48:...
7
votes
4
answers
11k
views
Hosting a .net Core application in IIS. Could not load configuration. Attribute 'processPath' is required
I'm trying to host a .net Core API in IIS.
When I have it running in Visual Studio everything is working correctly. For deployment I first published the project to a folder, copied the contents to ...
7
votes
2
answers
10k
views
How do I configure a .net core API to work in IIS?
I've got a .net core API created in Visual Studio 2017 that's working fine. When I go to deploy it I get error message HTTP Error 500.19 with error code 0x8007000d. I've found multiple solutions ...
7
votes
2
answers
4k
views
ASP.NET Core 3.1 InProcess hosted app not restarting after exception on startup
The issue
I've got an ASP.NET Core Web-Application hosted InProcess using IIS. I implemented an exception thrown at every startup. As expected, IIS shows this error page:
HTTP Error 500.30 - ...
7
votes
1
answer
9k
views
Cant get ASP.NET Core Web API to work with IIS [closed]
I'm building an ASP.NET Core MVC Web Api application and I'm trying to get it to work with IIS on my own machine. I have read different blogs and tried different things but just can't seem to get it ...
6
votes
2
answers
3k
views
IIS randomly Restarts Dotnet core apps
So in production, all my dotnet core apps hosted in IIS 8 (Windows server 2012 R2) restarts at random times during the day. About once a day. Never at the same time - random times. I've got many users ...
6
votes
2
answers
3k
views
How to send email locally in .net core without credentials
I want to test sending emails in my web app which is using .net core 3 with C#.
The issue is I am on a corporate network which blocks port 587 (for now).
I saw an article which says you can use ...
6
votes
1
answer
2k
views
Can host ASP.NET Core site through console but not through IIS
Solution and server configuration:
I have developed a fairly simple ASP.NET Core application. It consists of a core project file, created and built in Visual Studio 2017. The target framework is ....
6
votes
1
answer
3k
views
HTTP Error 500.19 - Internal Server Error in windows server 2012 R2
I'm trying to install a dotnet core application in IIS on a machine with windows server 2012 R2 installed, but I'm getting Error 500.19 with the following characteristics:
According to my searches, I ...
5
votes
3
answers
14k
views
HTTP 413 - Request Entity Too Large cheat sheet
I am trying to upload a large file to my ASP.net core/ASP.net mvc site, but keep on encountering HTTP 413 - request entity too large. Even when I try to update web.config, other things still break.
...
5
votes
1
answer
3k
views
How to debug when added MIME Type is not working on IIS for .Net Core projects
When I refer to an ".apk" file in the browser whether it be http or https response is error 404 and it don't start to download that file.
The address of ".apk" is
http://example....
5
votes
2
answers
4k
views
HostingEnvironment does not contain a definition for IsHosted
I'm developing a C# application and I need to find out if I'm under IIS or not. I've seen some question on SO about using the HostingEnvironment.IsHosted method. Unfortunately if I write something ...
5
votes
1
answer
3k
views
Publish .Net Core to IIS - Process cannot access file
I am deploying my ASP .Net Core 2.0 app to my remote server using FTP. Remote Server is using IIS 8. When I publish my app, I get the following error.
Unable to add 'Project.dll' to the Web site. ...
5
votes
1
answer
5k
views
.NET Core and IIS Intermittent 403 Access Denied
Alright Stackoverflow, after much fruitless research I've ended up here!
I am attempting to get a .NET Core 2.0 site hosted out of IIS with Windows Authentication and SSL, and no matter what I try I ...
5
votes
0
answers
4k
views
How to log authentication or authorization events in ASP.NET Core 2.1?
On IIS my web application responds with 403 Forbidden.
To troubleshoot the issue I'd like to log events of Windows Authentication.
The setup in Startup.cs is as following:
services.AddAuthentication(...
4
votes
3
answers
17k
views
dotnet core 3.1 IIS Error "An attempt was made to access a socket in a way forbidden by its access permissions (10013)"
I've dotnet core 3.1 project. I launched a few machines on iis. But today i can't launched the app on iis. I can launch with "dotnet <app.dll>" command and everything's good. But when ...
4
votes
3
answers
27k
views
IIS and NET Core HTTP Error 500.30 - ANCM In-Process Start Failure .net core 3.1
I've created application in .NET Core from template - with Angular and Authentication. .NET Core 3.1
In Properties->Debug-> for IIS profile I've setup Hosting Model as Out of process. But in Web....
4
votes
2
answers
8k
views
dotnet publish commandline with platform parameter value of "Any CPU" for a .NET Core Web API Application
We developed an a .NET Core Web API application using the following technologies:
-NET Core (3.1)
-Visual Studio 2019
Unfortunately, we have to deploy said application to the following environment:
...