ASP.NET Core 6 site work with kestrel not with IIS or IIS Express (503) - asp.net-core

I'm working on an ASP.NET Core 6 site and I usually use kestrel to run and debug the application. Today I've deployed the app to IIS but after one or two requests IIS stop responding and only return
HTTP Error 503.0 - Server has been shutdown
Same behaviour with IIS Express. Everything works fine with kestrel.
I don't know how to debug the problem, I've attached the debug but with no luck. I've also looked at stdout log but nothing appears.
Does anybody have any suggestions on how to debug the issue ?

Please follow my step to collect the dump files. And if want analyze the dump files you can create a new post and ask for help. This answer just tell you how to debug issue.
First Way
Remote debug with visual studio 2022
Deploy your app to IIS.
Run your VS2022 with administrator and attach the process.
Reproduce the issue to check the issue.
Second Way:
Collect dump files
If the first method can't reproduce or debug the issue.
You can follow below steps to collect the dump.
Download and install Debug Diagnostic Tool v2 Update 3.1
Deploy your webapp in IIS
Set rules to collect dumps by using DebugDiag or Collect dumps manually

Related

ASP.NET Core 3.1 app on IIS Express: “This site can't be reached” and "The connection was reset"

I have developed ASP.NET project in Visual Studio 2019. When I try to run the project with IIS Express, the webpage says “This site can't be reached” and "The connection was reset".
In taskbar I can see that IIS Express is working and I'm able to debug and step though my code till the very end successfully so I know the service is executing fine without any errors.
Site can`t be reached
I created a new project, just to ensure that there weren't any errors within my config or build files. When I run the new project, I get the same result.
I tried with other browsers as well, but still the same error.
I repaired the Visual Studio using the Visual Studio Installer, and reset everything to default, and had no success with that.
I tried to delete hidden vs. folder and had no success.
Any advice on how to resolve this would be greatly appreciated.
Thanks!
I fixed the issue by deleting Kaspersky Antivirus.

HTTP 500 error launcing ASP.NET 3.0 application

I have just upgraded our ASP.NET Core 2.2 web application to 3.0. It builds and deploys fine. The problem is when I go to run it from our IIS server. This was running perfectly fine as a Core 2.2 web app, but now fails since upgrading to Core 3.0.
When I launch the web app from the commandline there are no reported errors.
When I launch the application from the browser the Windows logs indicate that the app started correctly.
The app then fails with an HTTP 500 error. Here are the IIS log entries.
We're using Windows Server 2012 R2 with IIS 8.5.9600.16384
The app appears to start correctly but then fails with an HTTP 500 error. Has anyone else seen this or something similar? Any ideas how to diagnose / fix the problem?
UPDATE
I've attached the VS 2019 debugger to the deployed app via the w3wp.exe process and it's not even hitting any of the middleware (I have a breakpoint at Startup() in Startup.cs).
I've tried changing the application pool settings e.g. identity, .NET version but to no avail.
When I launch the site from the web server I get the following error message which doesn't really tell me anything.
I can't see what's causing the problem.
.NET Core 3.0 uses the in-process hosting model by default. You may need to upgrade the .NET Core Hosting Bundle.
You will check web.config "aspNetCore"
<aspNetCore processPath="dotnet" arguments=".\Api.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
maybe proccessPath is wrong.
if it doesn't solve problem , write to log step step startup.cs.
Maybe throw error in startup.cs
After investigation and comparison of the build artifacts that the build produces vs the deployed app, I discovered that the appsettings.json was not being deployed. No idea how or when this started failing, but it caused the app to generate an HTTP 500 error message. Our app's Azure ADB2C settings are contained in this file so it was crashing trying to authenticate but couldn't find the authentication settings.
There was no obvious error being generated and everything seemed to be loading fine. It was at the point at which the app was trying to authenticate that it was failing. All working now.

Attach to MVC 6 process in IIS

I am hosting an asp.net 5/mvc 6 application in local IIS using dnx x64 1.0.0.rc1. I would like to attach to the iis process and debug my application, but no symbols are ever loaded for the classes that I set breakpoints in.
Is this possible with this version of dnx and IIS?
If so, how do I attach to the iis process with symbols loaded?
---UPDATE
So I've tried attaching to dnx.exe, but still no luck. Strangely, I was able to get this to work one time, but cannot replicate it again. So if anyone can outline the steps required to debug MVC 6 on IIS, please post here.
What process are you trying to attach to? I believe you should be attaching to dnx.exe

Deploy MVC 6 app in IIS

I'm using Visual Studio Express 2015RC and I created a simple MVC 6 application, but when I try to publish it I don't see the option to deploy it to IIS, I see the options Microsoft Azure Web App, Import and File System, I tried the File System but It looks like it is more for creating stand alone applications to be launched from a console, now, when debugging I can select IIS Express or the web command, there is no IIS option, so the question is, how can I deploy the MVC6 web application I created to IIS?
File System publish is actually exactly what you want; All DNX applications are stand-alone, whether for ASP.NET 5 or a console app.
When you publish to the File System, you get a few folders; the wwwroot (assuming you kept the default in your project.json) folder is where IIS should point. The web.config in that folder is generated for you automatically assuming you keep everything else where it is.
For what it's worth, the official documentation will probably be here, once it's written. Also, on Stack Overflow, ASP.NET 5 project hosting on IIS probably has some useful information, though it looks like it's a bit out of date at the moment.

Deploying web application in SUP2.0

I have deployed my web application in the folder
C:\Sybase\UnwiredPlatform\Servers\UnwiredServer\deploy\webapps
of SUP server. I have stoped and restarted the server. But it is not working.
i have also checked the server error log file it is not showing any error.
I have tested the same in tomcat server 6.0 it is working fine.
I am new in SUP2.0 environment. Please help me in deploying web application also let me know if i am following the right procedure..
thanks in advance
Pratap Kumar Panda
The suggested way to deploy a webapp is though Eclipse. (with the sybase plugin installed)
See these series of tutorials
http://www.youtube.com/watch?v=ls-swn433g0