Application Pool Crashes IIS 10 ASP.Net Core 3.2 Blazor App EF Core - asp.net-core

I have an Asp.Net Core 3.2 Blazor Webassembly application that has been published to a server running Windows Server 2016 with IIS 10.
After publishing to the server I can browse the login page to the site, However, when I attempt to login which calls a service and signs in with Entity Framework Core 3.1.5.
However when I attempt to call a linq query on the DbContext it seems to fail (This is deduced from log files).
Interestingly, if I remote into the server whilst running a login I get a JIT popup with the following error;
In the Windows System Log can see the following error;
A process serving application pool 'myapppool(domain)(4.0)(pool)' suffered a fatal communication error with the Windows Process Activation Service. The process id was '10188'. The data field contains the error number.
It seems to sometime crashes the apppool as well so if I then refresh the page i get 502 error on the site?
Below is a screen shot of the application pool advanced settings;
The server is running Windows 2016 with Plesk Obsidian installed on it (I'm not sure if this can interfere in any way??)
Does anyone know whats going on here please?

I don’t know what’s going on since I can not reproduce your issue. Here is a workaround.
Please ensure that IIS Application pool’s Advanced Settings has set ”Enable 32-Bit Application” to true.
Check below link for troubleshooting the issue.
How to diagnose IIS fatal communication error problem

Related

Blazor Server - Slow load or unresponsive but still loading on browser (deployed to Windows Server 2016. IIS8)

Good Day everyone
We are currently testing our first Blazor Server application that is deployed on our Staging Server (Windows Server 2016 with IIS 8), we have noticed that, when the application is accessed by multiple users and doing some testing process, the application becomes slow, or sometimes when accessing the site again, the browser still loads the application but without rendering the design, we check it using the dev tools in google chrome, and on the network tab, it says "pending" under the time column.
We tried to ping the application, and it returns without too much latency, I don't know if this application side or on the server or the network, we deploy the project similar to our ASP.NET Core MVC projects, we are all testing the applications on our homes, because of the global pandemic.
Is there a different setup for Blazor Server when deploying to IIS?
I hope someone can help us with this.
Thanks, everyone, and regards.
Edit
We found the suspect, It's the Visual Studio JIT Debugger, yes we install VS2019 on our Staging Server, it's weird that we haven't encounter this from our other web application, is it because the project is in Blazor Server? when we check the server the JIT is running, and then the app is working again, I think when the application encounters an error, this shows up on the server side, and when it reach 3 JIT on the process, it will not continue to load the application.
I search for this and the answers is to disable the JIT Debugger, either in VS or in the register, is disabling this is the best solution??
Thanks again everyone.

asp.net mvc web application page loading slowness issue

we have developed an application using ASP.NET/C# MVC 4.0, SQL SERVER 2012 DB, Entity Framework, WCF Service.
application website is hosted on IIS 10 and the operating system used is Windows Server 2016 and this is standalone WEB server dedicated for our project.
application WCF web service is hosted using Windows Service and this is standalone APP server dedicated for our project.
application database is hosted on SQL Farm and this is a common database server, where other projects databases (more than 60) are also hosted.
application is already running absolutely fine in PROD environment from couple of years.
but suddenly from couple of months, we started facing as intermittent issue and i.e. application slow response
There are no errors, but the response time is too long, and sometimes it doesn't respond either, the browser keeps waiting for the web server.
customer has complained that his web application gets slow sometimes.
It happens at random times, the system just gets slow then after few hours (2-3) it gets back on track with normal response times.
this slowness issue is affecting only to one specific MVC View, whereas other MVC views are rendering correctly at the same time when slowness issue occurs.
error handling is already in place in the .net code, but nothing gets logged in error log file.
also DBA has confirmed that there are no issues on the SQL Farm and none of the other projects apart from us has reported slowness issue whose database is also hosted on the SQL Farm.
when tried to reproduce the same issue on UAT with the same PROD database copy & same user, was not able to reproduce it.
UAT environment is exactly similar for WEB & APP server.
only in case of UAT database server, we do not have SQL Farm here. we have standalone database server dedicated for our project.
here tried doing some R&D and verified few things, but still unable to resolve the issue.
so could you please guide me here that what should i do/verify to resolve this issue.
thank you in advance for your inputs.

Lightswitch Deployment (Visual Studio 2013) Tier-3 with No Authentication

I am attempting to deploy a simple lightswitch application (HTML not Windows app) in VS 2013. I have selected to not have authentication to make the testing easier.
The IIS server and the database server are on different machines. I have followed the steps here for server setup.
However, when I go to the website after publishing, I get this error:
You do not have permission to view this directory or page.
I went to the IIS server and made sure that only Windows authentication was enabled on the application that was sent over. After reading another MS article on the 401 error, they recommended unchecking the Kernel Mode Authentication. That only prompted a username/password request, which did not work.
What am I doing wrong here? I assumed having no authentication setup in the deployment would make the website open to anyone on our network. Not the case?
Found the problem(s) with this one.
Problem #1
When I downloaded / installed Microsoft's Web Platform Installer on my IIS server, the LightSwitch application I was working on and several other seemingly random websites/apps in the IIS all had the Authentication settings disabled for every authentication type (Anon, Basic, Windows, Forms, etc.). Had to go and Enable windows authenication on several websites. Did not expect that...
Problem #2
HTML Client folder was not loaded on the machine for some reason. Removed Lightswitch app from IIS and deleted the folder. Created a package for install in VS2013 and then copied the zip file over to the IIS server. Flawless install after that... One thing to watch for it to change the default setting in IIS from 'default.htm' to 'default.aspx'.

Does Microsoft Application Insights support MVC 6 (.Net 5)

I'm trying to setup a prototype with an mvc 6 project and application insights. When selecting to monitor an mvc 6 website in IIS 7, it says it is monitoring but no server statistics are being sent to Azure. When I monitor any other sites on that server it works correctly. So my question is, does application insights support .Net 5 and MVC 6 running in IIS?
In the website I have installed Application Insights using the snippet of javascript provided by Microsoft Application Insights. This is working correctly and sending data to Azure.
The website is on a local Windows 2012 server. I have installed the Application Insights Status Monitor on the server and I have it pointed to the mvc 6 website. This part is not working. When I point the Server Tool to a site on the local server running a .Net 4.5 website it does submit the data correctly to Azure.
I did not add the AI part via nuget package because I am not submitting any custom alerts to Applications Insight. Right now I am just looking to get the server statistics. IE Memory, Processor usage, etc.
Asp.net vnext is not currently supported. But there are plans to support it in the near future.
There is ongoing work visible on it in github: https://github.com/Microsoft/ApplicationInsights-aspnetv5

Error while publishing Lightswitch application remotely from Windows 7 PC to Windows 2003 Server having IIS 6.0

I am trying to publish a Light Switch 2012 application as Web Application from Windows 7 PC to Windows 2003 IIS server, .Net Framework 4.0
The publish Summary as follows
Application Name - User Test
Application Version - 1.0.6.0
Application Type : Browser
Application Server : IIS Server
Authentication : Windows Authentication
Database : Do not publish
Error details while publishing with the option "IIS server has lightswitch deployment prerequisites installed".
============================================================================
102 Web deployment task failed. (15/04/2014 16:24:51) An error occurred when the request was processed on the remote computer.)
(15/04/2014 16:24:51) An error occurred when the request was processed on the remote computer. The entry type 'unknown' was not expected at this time. The serialization stream may be corrupted.
When published without the option "IIS server has lightswitch deployment prerequisites installed".
the applications publishes successfully, But when the application is accessed from Browser it says authentication error.
I have searched a number of blogs with the same issue, but none have answered.
Any help will be highly appreciated.
From the errors you can conclude :
Your server does not have lightswitch deployment prerequisites installed.
There is a problem with authentication.
You must further investigate what authentication problem occurs. As the question is now, there is no way to guess what the problem is.
I would suggest the following steps to workaround the authentication error.
Keep the option in the publish wizard i.e "IIS server has lightswitch deployment prerequisites installed". and
1.In publish wizard choose the option "Yes,Create an application
Administrator" and mention your login credentials.
2.Make sure you have rights on the database that you supplied while deploying
the application. for example I use "sa" account to deploy the
database.
3.In webconfig file, makesure you are the admin to the app.
/* !-- If no admin user exists, create an admin user with this user name->
add key="Microsoft.LightSwitch.Admin.UserName" value="DOMAIN\EMPID" />
*/
4. Assuming If you are able to deploy the application with no errors and still get the get authentication info or load error, check the table called [dbo].[aspnet_Applications] in the deployed database and makesure
your app name mentioned in the table data.If not the issue is with
database permissions.
5.Makesure your UserID shown up in the table [dbo].[aspnet_Users]
Hope this information helpful :)