IIS pool stops on first request - asp.net-mvc-4

I have .net framework 4.8 web site deployed on IIS 10. And It's pool stops on every first request after each start.
Here is the list of programs and features on server:
Programs and features
In Application Windows log I found 10 errors per each request. Everyone error is:
The Module DLL C:\Windows\system32\inetsrv\aspnetcore.dll failed to
load. The data is the error.
And in System log I have warning:
A listener channel for protocol 'http' in worker process '2968' serving application pool '{MyPoolName}' reported a listener channel failure. The data field contains the error number.
With binary data in details tab: In Words 0000: 8007007E
I tried to repair installed version of .net 5. Also tried to install .net framework 4.8, but installer didn't allow to do it because of:
.NET Framework 4.8 or a later update is already installed on this
computer.
I even tried to create site with empty directory. When I create one on my computer it shows "403.14 — Forbidden" as it should. But after doing the same on server empty site pool stops as my site's pool.
Have you ever faced such a problem? I have no idea how to fix it!

I have .net framework 4.8 web site deployed on IIS 10. And my IIS pool stopped on first request. Researching similair issues I found this artcle on the Microsoft Monitoring Agent APM service. This service was disabled, I removed the Microsoft Monitoring Agent APM as it was not being used. My application now successfully launches.
https://kevingreeneitblog.blogspot.com/2017/03/scom-2016-agent-crashing-legacy-iis.html

Thank you for your help. I solve the problem with complete reinstallation of server OS and components. My consider is that the problem was into iis or OS component.

Related

IIS can only support three instances of a Blazor server client?

I've download Visual Studio 2022 and tested the default Blazor Server template (Home/Counter/FetchData). In Visual Studio, IIS Express I can open as many tabs / instances of the application as I want.
When I host the default Blazor Server template in local IIS (Windows 10 Home 21H2, IIS 10) I can only open three instance of the application. The fourth will hang until the first is closed. I see someone has ran into nearly the exact same issue but there is no solution provided.
Anyone know whats going on? I don't understand why IIS Express can handle multiple instnaces but IIS 10 can not. Even Conveyor by Keyoti can support many many tabs compared to IIS 10.
Note: I notice SignalR has limitations on Windows / IIS of 10 concurrent connections, but I'm not even getting two.
Updates
Out of curiosity I tested it on Windows Server 2016 Standard and I can open hundreds of tabs.
I re-installed IIS on Windows 10 to make sure something wasn't wacky.
I've ensured WebSocket Protocol is enabled.
Windows 10 Home supports 3 concurrent connections at the same time, according to Microsoft.
Normal HTTP requests to IIS get process and response returned. So even if you manage to achieve 4 or more at the same time, IIS will work through the request queue and you may not have noticed that your request was slightly delayed unless your individual requests take a while to process.
However with SignalR, a persistent connection is maintained to the server. So if you open one connection per browser tab, and you have 4 tabs open, that 4th tab is going to hang indefinitely until one of the other page has its connection ended (by closing the tab, manually disconnecting via code, or refreshing the page).
I can't reproduce the issue, and I have tried to search some way to solve it.I will summarize a few ways below that you can try.
Try to install Websocket Protocol in your Win10. You can find it in Windows features.
Workaround: install IIS Express in Web Platform Installer.
Workaround: Try to deploy it in windows server, and check whether have same issue. I found some posts also mentioned it may related with OS version.
The solution was incredibly simple (maybe too simple?). Don't use IIS at all.
In Program.cs just before building the app I override Kestrel ports to listen on any ip (for now).
(Optional) I provide a custom SSL certificate in the UseHttps constructor so that it can be emailed and installed on iOS and Android devices.
(Required) Then I publish the applications to a folder and just run the .exe on the hosting machines.
Program.cs
builder.WebHost.ConfigureKestrel(opt =>
{
opt.ListenAnyIP(8000);
opt.ListenAnyIP(8001, listOpt =>
{
listOpt.UseHttps(#"Path to.pfx file", "password for pfx file");
});
});
Now Windows 10 Home can support as many connections as the hardware can handle at https://192.168.0.XXX:8001. Is this how Blazor Server is expected to be deployed within a local network? I don't understand how this overcomes the connection limit pointed out in masons answer. Please let me know in the comments if I'm missing something.

.NET Runtime version 4.0.30319.0. There was a failure initializing profiling API attach infrastructure.

Lately I started noticing ".NET Runtime version 4.0.30319.0 - There was a failure initializing profiling API attach infrastructure. This process will not allow a profiler to attach. HRESULT: 0x80004005. Process ID (decimal): 10288. Message ID: [0x2509]." on our production Windows Server R2.
This server is mainly used for IIS hosted WCF service. I googled about the error and found multiple solutions and I tried below.
1) Verified .NET framework with Microsoft's utility and no issues found. That means one of the application is firing this .NET error.
2) Tried tracking process id, but everytime error message has different process id. And I cannot find the pid from all available pid. My assumption is, it recycles the process after error and assign new pid.
What is the best technique to find source of this error? Is there anyway I can get pid history logs?
I checked all the recently installed softwares and uninstalled the ones which was installed after the first error date.
For me, it was Wireshark, after uninstalling I do not see this error anymore.
Cheers!

Windows 8.1 wcf communciation common algorithm exception

We encountered a strange problem with a piece of software that works already for 5 years. Recently we changed pc's and we're now developing on windows 8.1
The issue: We have a website that in the background connects to a wcf service that's using a certificate. Then we launch the website and try to logon.
First we found out that we had an exception:
The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:19:59.9910127'
A strange message because we had this immediatly so we didn't need to wait 20 minutes to timeout.
Because we needed to found out what exactly was going on we tried this setup on another pc with windows 8.1 Everything worked perfectly, the website didn't had any issues.
Then we decided to swap the connections and see if we could reproduce so we ended up like this:
My to collegae => ok
Collegae to my => ok
Collegae to itself => ok
My to myself => error
Then I tried to search for answers in the windows log books. In the system log book. I found that there where issues with the tls protocol.
Windows eventid 36888, Windows eventid 36874
Then we searched for issues around tls because of those 2 event id's but we couldn't find anything.
What's even more strange is that we have a thick client also locally installed on my machine that connects via the same wcf services and this one works also correctly. The thick client and website are written in C#.
I enabled the wcf trace for the web client connection.
I share this file via this link: wcf-log
When opened in the Microsoft Service Trace Viewer on the tab page Activity the last message contains the error.
The client and server cannot communicate, because they do not possess a common algorithm
After a lot of research it ended up to be TLS 1.2
As soon as this was disabled everything works like a charm.
Other tests that we did where
creating a project in .net 3.5 and an exact copy in .net 4.0
The result was that .net 3.5 worked like a charm and .net 4.0 failed like described above.
By this last test we searched the web again and found out a link that maybe could help us.
WCF .NET 4.0 doesn't work without TLS 1.0
The tool showed us that we had enabled everything but by reading the post we saw that we could have another issue because we also had sql server 2014 installed on this machine installed.
I really hope if someone has this issue he finds this post. This kept us busy for 3 days.

Windows Store Application unable to access localhost WCF service and throws EndpoingNotFoundException

I have a solution which basically contains three components:
• WCF Service that is hosted locally having a back-end SQL Server Express DB and this WCF service is hosted from a Windows Service
• A console application
• A Windows Store Application
This is what they are meant to do:
• WCF service his hosted locally and is used by the console app and the store app for communicating with the database
• The console app adds an image for processing to the database by contacting the WCF service
• The store app will at regular time look for unprocessed images in database via the WCF service and will process them
Now, the difficulty is:
• The WCF service is hosted successfully and is working absolutely fine and I can check that by hitting its URL http://localhost:8081/XYZ
• The console app is also able to submit images to the WCF service and add their local paths to the database
• The store app however always throws the EndpointNotFoundException when accessing the service at that same localhost path
What have I tried:
• I have tried almost everything from searching through stackoverflow to googling and haven't found a solution yet
• I was thinking that it might be a port issue and so I turned off the firewall to check this, but it did not work, and the store app kept throwing the EndpointNotFoundException
What have worked:
• The complete set-up has, however, worked perfectly on my machine. It is strange that its not working on my client's Windows 8 machine.
Point to be noted:
• The complete solution has been developed in Visual Studio 2013 and the App is for Windows 8.1
• I am not sure, but it seems my client has a Windows 8 machine and we are installing the app on that. (Possibly, that might be a problem. But I'll check)
If there is any help someone could provide me, I'll be really greatful. Thanks in advance!
This is expected. Windows Store apps cannot connect back to the local system in production. This loopback prohibition is disabled for debugging.
See How to enable loopback and troubleshoot network isolation
If your app is to be side-loaded rather than deployed through the store then see Using network loopback in side-loaded Windows Store apps

Fresh XP +click once +cannot connect

Greetings,
we have to following problem.
Our application is deployed using ClickOnce. Everything is running fine and application is able to connect to the wcf service. The problem occurs when application is installed on FRESH XP machine without .net Framework and Windows Installater (that were selected in ClickOnce prerequities).
Application downloads .NET Framework 3.5SP1 and windows installer but then it cannot connect the the server. Reboot after install does not help.
The strange is that this application has been installed on 10 xp machines and 4 of them can connect to the service without a problem
Are there any dlls referenced in your application? You might want to check them (Under project's Properties\Publish tab\Application Files button) see if you missed to include the needed dlls or files.
alt text http://www.freeimagehosting.net/uploads/e8ff221e20.jpg
We ran into this and were forced to reinstall .net on some machines no idea why though.
This is a shot in the dark but have you tried depends.exe and see if it can profile what is happening.
Also Take a look at this blog and get a crash dump and see if you can use it to at least tell you what is complaining the loudest.
What do you mean when you say 'cannot connect to the server'?
a. The machine cannot connect to the install location and therefore the clickone app is not installed?
b. The app installs (along with the pre-requisites) and starts fine. Then it is unable to connect/communicate with your WCF services.
I presume (b) I just wanted to clarify.
What happens when you ping the machine the services are on from one of the failed install machines? Also what happens when you put the service url into a browser on one of the failed install machines? Can you see the wsdl?
Obviously your deployment package works because it works on those other machines (I assume it IS the same package all machines are installing?), therefore I doubt you are missing any dll's as a ClickOnce app should include all dll's it needs (sometimes you do need to tell ClickOnce explicitly to include).
Last question is, when the app tries to call the service, exactly what exception is it getting back?
I just remembered something which has caught me out in the past with some machines being unable to connect but others can...especially 'new' machines.
Check this file:- C:\WINDOWS\system32\drivers\etc\hosts
Check the contents on a machine that works and one that doesn't. We have some IP to machine name mapping going on that on new machines is not set and so the new machines cannot find the servers.