IIS can only support three instances of a Blazor server client? - asp.net-core

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.

Related

IIS pool stops on first request

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.

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

Windows application server communication issue

I recently developed a windows phone application using phonegap(HTML5, CSS) in visual studio and generated the deployable XAP file. When I registered my device with my developer account I was able to install my application locally and was able to do server communication as well. But when I submit the same XAP file to store and then download from store, the server communication is failing. As this issue is observed only at store I am not able to debug the issue.
My question is how can the same application show different behaviours when deployed locally & downloaded from store.
Note: I am doing ajax requests for server communication.
Please let me know if some permissions need to be given while submitting to store or any work around needed from me to fix this issue. Requesting a response soon.

Issue with Internet Explorer 8 and 9 and MVC4 Web Site running on IIS 7.5 on Windows Server 2008 R2

We recently upgraded an MVC3 application to MVC4 and .Net 4.5. The upgrade was done by creating a new MVC4 site and adding all the controllers etc back in, manually.
The site was deployed internally to a win2008 R2 64 bit server, on which we installed .Net 4.5.
When we browse to the web site with IE8 or IE9 the application works well for a while as we navigate through various pages, including standard views, partial views, popups, paged lists etc.
At some point we end up going to a page in the site (any page, complex or not) and IE8 and 9 both just sit there for a long time (usually 1-3 minutes and displaying the page loading progress bar) eventually they both show the page as requested. Often the same behaviour occurs on the following few pages and then magically comes right (for a while)
If we browse to the same web site in Chrome, Ie10, Safari, FF at there are no issues at all. If we browse to the web site with one of these browsers from the same machine while the ie8/9 are "loading" then we can still access the site quite happily without any issues.
A check of task manager memory and performance on the client, web server and database server shows almost no CPU usage and no increased memory usage while this is happening. It is almost as if the browser is just taking a tea break. Fiddler shows nothing unusual either.
It should be noted that as this is an SAAS application we are managing multiple databases through the same site and these are configured into the users session state based on an incoming url in the web site bindings. Having said that as far as we can tell, the session state is remaining intact. a) The browser does eventually return with the expected data, b) there are no recycling events recorded in the event log (in fact there are no events at all around the time this issue occurs)
Application pool is set to framework 4.0.30319, integrated, enable 32bit, max worker processes = 1
We reverted the web site on the server back to the original MVC3 implementation and still retained the .net4.5 install on the web server. This now exhibits the same fault as the mvc4 site.
We re-imaged the server to a state before the .net4.5 was installed, ran the MVC3 site and everything operated again as we would expect. Repeating the install caused the same problem again.
It is almost like the .net4.5 install on the server has caused some problems for the IE8/9 browser. Back to fiddler again, which shows different host headers for the different version of .Net, but that seems to be the only difference.
Whilst we would love to be able to tell the user's not to use ie8/9 that is not practical, so now we are completely stuck.
Any help / ideas will be appreciated. Thanks.