What constitutes an 'Application' in ASP.NET 4.0? - iis-7.5

We have an ASP.NET 4 application running on Windows Server 2008 R2, IIS7.5 and several HTML-only websites on a server. I've created an application pool called 'Basic HTML' with NO managed code and put all the HTML-only websites into it. The ASP.NET 4 application is in its own 'integrated' pool.
We use several counters on perfMon including #applications running to keep an eye on things. I am scratching my head becuase I could have sworn that not too long ago the ASP.NET site was the only #application running (it was 1) even when we hit the HTML-only sites. Now it seems all of them contribute to it.
Is that normal? Has something changed?

Related

How to host a asp.net core MVC app in IIS?

I am familiar with .Net in general but new to ASP.Net Core. I just had my first "self-hosted" ASP.Net Core MVC app running (created using templet and runs under Kestrel by default) . What I would like to do now it to host it in-process with IIS. But what I am struggling with is that I couldn't seem to find a clear and detailed instruction/document about what I need to do to get it to work. I have tried various configuration changes on my own but nothing works so far. I am running .Net Core 3.1 and using VS.Net 2019 on my Windows 10 environment. If someone could point me to the right direction it would be highly appreciated.
As far as I know, if you want to host the asp.net core application on the IIS. You should make sure you have installed the right hosting bundle.
Notice: No matter you use in-process or out-of-process, you all need install the IIS hosting bundle.
More details about how to install it, you could refer to this link.
After install the link, you could check your IIS module to make sure you have installed the right asp.net core module.
Then you could use VS to publish the application to right folder and create the IIS web site as below:
Create IIS website:

Running multiple ASP.NET Core 2.2 webapps side-by-side in IIS

I'm trying to run 2 ASP.NET Core 2.2 webapps side-by-side on IIS 10. I created CoreTestApp1 & CoreTestApp2 (default VS template, no added code), i.e. both set up for In-Process hosting.
After I restart my server (IIS Mgr), the first webapp that I open in a browser (e.g. CoreTestApp1) runs fine; if I open the second one (CoreTestApp2) I get an error "HTTP Error 500.0 - ANCM In-Process Handler Load Failure".
If I restart my server again and open CoreTestApp2 first, then that runs fine, but now CoreTestApp1 causes the same error.
I tried running 2 ASP.NET Framework apps side by side, and that works fine.
Judging by the info I found (e.g. https://learn.microsoft.com/en-us/dotnet/core/deploying/index), it seems I should be able to run multiple core apps side-by-side?
Is there some extra config stuff that I'm missing?
Not sure if this is relevant, but I used Visual Studio's publish (to folder) with these settings...
Configuration = Debug
Target Framework = netcoreapp2.2
Deployment mode = framework-dependent
Target runtime = portable
Thanks to Lex's suggestion and some more googling, I found the answer to my question here:
The ASP.NET Core module V2 running in InProcess mode has to run in its own dedicated Application Pool. According to the documentation you cannot run multiple sites or virtual directories (Web Applications) using the the ASP.NET Core Module in a single Application Pool. Make sure each ASP.NET Core app on IIS gets its own Application Pool.
Creating extra Application Pools and assigning each ASP.NET Core app its own solved my problem; instructions on how to create App Pools here.

Page keeps loading forever

Im using IIS 8.5 on Windows Server 2012 R2 so I add my Web Api but when I try to view the site it stays in a loading state like this:
Do not show any message or error just stays loading, I think that i miss some configuration or feature in my IIS but I don't know which one.
Edit: I use .Net framework, it is a REST .net web api like this reference, the IIS have installed .Net versions 3.5 and 4.5, it's IIS not the express and the default IIS website runs fine.
I would really appreciate any help.
Try to reduce the timeout settings to a minimum level, say 10 seconds.
See if it throws a Timeout error.
Without much information from your side its hard to judge.
Perhaps it could be an external service you are trying to access(Web service) or a DB connection?
Please check if the application pool you assigned to your solutions runs under the correct version of .net framework and in integrated mode. I had similar issues when trying to run an mvc app in classic mode. Check this out.
EDIT 1 - Reconfiguring IIS
If problems persists then try the ASP.NET IIS Registration tool. Execute the followig command as administrator:
aspnet_regiis -i
At the end of this post the different locations for aspnet_regiis are described. You should select a .NET Framework version corresponding to that of your project, run aspnet_regiis and assign the proper application pool to your app.

HTTP Error 404.17 - Not Found (.Net 4)

I've just got a new server setup on Windows 2008 Web edition. I'm trying to set the first asp.net 4 application up on it but am having nothing but problems.
The latest is that I'm getting the 404.17 error, which says "the requested content appears to be script and will not be served by the static file handler.".
I've done a lot of research on google but most suggestions seem to be to run aspnet_regiis -i to install asp.net 4. I've done this several times both on the Framework and Framework64 folders, but with no success.
I tried changing from the default application pool to a .net4 application pool, which appeared to work at first and I instead got a server error to do with permissions. I fixed that, and immediately the 404.17 error returned.
Other suggestions I've read say to go into the "turn windows features on and off" and make sure .net 4 is selected there under IIS. However on this server clicking "turn windows features on and off" takes me to the standard windows 2008 server manager. I click "add features" there, and only ".NET Framework 3.0 Features (Installed)" is listed and selected. .NET 4 isn't shown there, yet it is selectable through the application pools.
What else can I try to get the website running as I'm at a complete loss now. Its annoying because my old server was easy to manage - I did it all through the server itself without a control panel (Windows 2003), now on my new server I have to manage most of it through Plesk because there is no dns.
Any help would be much appreciated.
I too had the same problem but solved it with simple solution. My program was in framework 4.0 but in application pool was mapped to framework 2.0.
Just changed the frame work in application pool to 4.0.
It worked.
I've finally figured out the problem, and it was to do with Plesk itself.
After delving through some of the thousands of links throughout the plesk control panel I found a page for "Website Scripting and Security". Under there it was set to .NET 2.0. However, even though I'd installed .NET 4 on the server, Plesk didn't know about it. Although the application pool I'd set the website to run under through IIS was .NET 4, it still wouldn't work for some reason.
I then found another page under "tools and settings" for server components, and on that page is a refresh button. Hit that and it suddenly realised that .NET 4 was installed, went back to the website scripting and security page, selected .NET 4, and hey presto, I got a server error (never have I been so glad to see a server error).
I then just had to give the application pool identity read access to the web folder, and the website worked.
I wish I'd paid an extra £15 per month for Windows 2008 Standard edition now so I could manage it all manually without Plesk.
Ensure that you are running this application under a Virtual Directory, also ensure that your IIS has ASP, ASP.Net, ISAPI Extensions And Filters, Static Content installed.
Change the .net framework from 'plesk' panel:
go to Domains
select then domain
Go to 'Domain and Websites & Domains'
Hide Advanced Operations
Go to 'Asp.net Settings'
Go to 'Change Version'
select 4.0
If you don't have the 4.0 option then you must install the framework on your server first.

running asp.net 2.0 and 1.1 on same site...works in one area but crashes another

Our site is running ASP.NET 1.1, and I need to have ASP.NET 2.0 running in a separate section to the same site until we get it fully converted over. I created the new folder and in IIS, I ‘create application’ process on the folder. Then, I went to the ASP.NET tab and changed the version for my new app to 2.0. This works fine on my local computer and works fine for the admin folder that achieves the same task which a co-worker created, but for this folder, it made the .NET 1.1 parts of the site crash giving the following error message (below). I ‘removed application’ on my new folder and it fixed the error.
=====================================
Server Application Unavailable
The web application you are attempting to access on this web server is
currently unavailable. Please hit the "Refresh" button in your web
browser to retry your request.
=====================================
You can't run two different versions of ASP.NET in the same application pool. You will need two separate application pools and two separate websites to serve up ASP.NET 1.1 and ASP.NET 2.0 from the same IIS installation.
Your problem is with the application pools you are adding your applications to. .NET 1.1 and .NET 2.0 can not run side by side in the same AppPool. (They certainly can't run in the same folder or virtual directory).
The easiest way to handle this is to create an AppPool called .NET 1.1 and one called .NET 2.0.
When you run 'create application', make sure you select the correct AppPool for the .NET version the application uses.
That should take care of any errors when you run your application.

Resources