IIS Default website throws error with .CLR 4.0 System.OutOfMemoryException. 2.0 works fine - asp.net

I have a Windows 8.1 machine (2GB RAM + 32-bit OS, x64-based processor) and have configured IIS on it. When I try to launch the default website (localhost) which is by default on port 80, it throws the following error:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Exception of type 'System.OutOfMemoryException' was thrown.
Source Error:
Line 109:
Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config Line: 109
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34248
This happens right after the OS installed, updated with Windows Update and IIS configured. Machine is clean and there is no other app, not even an anti-virus installed.
Same this is happening with my other websites as well. Even with a one page 'Hello World' asp.net page.
What works:
When I change the application pool to 2.0, it works fine.
So far:
I have tried resetting permissions C:\Windows\Microsoft.NET\Framework\v4.0.30319
Tried running aspnet_regiis.exe /iru command
Adding features from 'Turn windows features on or off' (Even all of them)
At any point my system has around 800 MB free RAM.
Other Info:
I have a Windows 2012 Server, 2Win 7 machines and 2 windows 8 machines on which my website works fine. This is the last Intel NUC which I'm testing and it's not working. I need to be able to locally host my application on this machine so it can work offline. But as I mentioned, I don't see the issue is with my website since it doesn't work with a single-page website and not even with the default website.
Any help or direction is much appreciated!

Related

Publish a .Net 5.0 web in IIS from Visual Studio 2019 doesn't start

I am trying to publish a test website in .Net 5.0 on an IIS on Windows 10.
I have .Net 5.0 installed
I have activated the IIS on Windows
I have installed the ASP.NET Core 5.0 Runtime (v5.0.1)
I have installed the dotnet-hosting-5.0.1-win
I have created the web application in the IIS and assigned it a specific Pool with the .Net CLR version "No code managed" and "Integrated". I have assigned the port 8090.
From Visual Studio when Publish I selected:
File System
Configuration: Release
Target Framework: 5.0
Deployment Mode: Self-Contained
Target Runtime: win-x86 (with win-x64 it doesn't work either)
My Windows version is 1909 (OS compilation 18363.1256)
If I navigate to the path http://localhost:8090/ I get this error "HTTP Error 500.32 - Failed to load .NET Core host.
I have reset the IIS, I have deleted and recreated the application, I have restarted Windows, but it still does not start the test web.
The Windows event viewer showed me these errors:
Unable to load 'C:\inetpub\wwwroot\TestNetCore.\hostfxr.dll'. This might be caused by a bitness mismatch between IIS application pool and published application.
Could not find 'aspnetcorev2_inprocess.dll'. Exception message:
Failed to start application '/LM/W3SVC/2/ROOT', ErrorCode '0x800700c1'.
I don't know what else to look at. Any ideas or suggestions?
Your errors are in ASP.NET Core, For these errors, you can try the following solutions:
Have you install asp.net core module? if not, please install it:
ASP.NET Core Module
Open IIS manager > Application Pool > Select App pool > Advanced
Settings, update "Enable 32 bits applications" from false to true > Click OK.
Try to delete the applicationhost.config (in .vs\config\applicationHost.config) and rebuild app.
I solve this problem in this way for myself:
In web.config I remove hostingModel="inprocess"
I answer for others who encounter this problem

Force w3wp.exe process to start in 32-bit mode

I've created an ASP WebForm application that requires "Enable 32-Bit Applications" to be set to true. When I set the site up in IIS I set "Enable 32-Bit Applications" true, but when I look at the Task Manager I'm not seeing the *32 next to the w3wp.exe process that starts up. And when I browse to the site I'm getting "Service Unavailable - HTTP Error 503. The service is unavailable." as the App Pool stops within IIS.
How can I force the w3wp.exe process to start in 32 bit mode?
EDIT- The machine in question is a 64-bit Windows Server 2012 R2 in case that matters
EDIT 2- I found a link to http://www.manasbhardwaj.net/running-32-bit-web-application-iis-8/ Which references issues wile Running Sharepoint 2013, Which is running on the web server. It applied the changes, and now when I run the site I get a configuration Error regarding framework versions.
I find it odd b/c the app pool still is not showing the *32 next to it, but it didn't crash when starting the site.
I'm going to ensure the latest .NET framework is installed now.
EDIT 3- Looks like I need to run a couple of updates on the machine in order to install the latest .NET framework. The .NET framework my site uses is 4.6.1, Is this version Stable enough to run on a Live WebServer running SharePoint 2013?

ASP.NET on mono: System.TypeLoadException

I would like to develop a website with ASP and run it on a Ubuntu or Debian server using Mono. To start I have created a very simple application with Visual Studio on Windows and want to deploy it to a Ubuntu box, just to see that it works. But so far it doesn't.
What I have done: I have created an ASP.NET (version 2) application with Visual Studio 2012 on Windows. Then I have published the project to my file system an copied it to the server. It runs Mono version 3.2.8. I have configured a vhost following this instruction: http://devblog.rayonnant.net/2012/11/mvc3-working-in-mono-ubuntu-1210.html.
However, if I open the browser and try to open the website, I get a System.TypeLoadException. It says:
Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): <myprojectname>
Needless to say that this error does not occur in the debug environment.
I have been trying to fight this all day but I can't figure it out. Any help will be greatly appreciated.

Errors Running ASP.NET 1.1 on IIS7 (applicationHost.config)

I am trying to port an existing ASP.Net 1.1 website to another web server that currently runs IIS7 and a number of websites that target either .Net 2.0, 3.5 or 4.0. All other sites continue to work perfectly. Unfortunately, I can only browse static files on the newly imported site. If I try to access any of the Features in IIS7 for the new site I get the following error dialog:
There was an error while performing
this operation.
Details:
Filename:
\\?\C:\Windows\system32\inetsrv\config\applicationHost.config
Error:
I followed the instructions on this page but am at a loss as to how to get this working.
I encountered this problem too this afternoon.
I did a quick google and found others with the same issue on the asp.net forum. The issue seemed to be that
Here is what got me past this error, hope it works for you.
the runtime tries to load the
corresponding configuration, it
doesn't take the bitness of the
application pool into the
consideration. As you know, ASP.NET
1.1 is only supported on 32-bit. So if you have a 64-bit OS, in order to
run ASP.NET 1.1, you have to enable
32-bit applications in the application
pool. So, with the QFE/SP2 on 64-bit
OS (and only on 64-bit OS), the
runtime is incorrectly looking for the
1.1 version of the configuration under Framework64, which does not exist.
Workaround:
Create the Framework64 directory for 1.1
md \windows\microsoft.net\framework64\v1.1.4322\config\
Copy the 32bit config to 64bit config location created in step 1.
copy \windows\microsoft.net\framework\v1.1.4322\config\machine.config
\windows\microsoft.net\framework64\v1.1.4322\config\
http://blogs.iis.net/wonyoo/archive/2009/06/18/workaround-running-asp-net-1-1-on-vista-sp2-ws08-sp2.aspx

Can't install IIS7 and ASP.NET 3.5 on Win7 64-bit

Using Win7 32-bit for 3 months and didn't have problem with developing any .NET-based applications including ASP.NET apps.
Just upgraded my laptop's RAM 3 days ago and switched to 64-bit version of Win7.
When I'm working on installing IIS7 and .NET Framework 3.5 SP1, there's an error about not all features were installed for some unknown reason.
When I try to register ASP.NET using aspnet_regiis -ir in c:\Windows\Microsft.NET\Framework64\v2.0.50727\, a dialog box shows with this error message:
"Operation failed with 0x80070643" and after I close the dialog box, another error message on the console command shows with this message: "An error has occurred: 0x80004005 Unspecified error".
I had the same problem and I did everything found on the internet but nothing was useful
eventually I was able to solve it by using the following:
note: do it on your own risk
Add the following to you registry only if the doesn't exist (in my case they didn't exist):
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_2.0.50727]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_2.0.50727\Names]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_2.0.50727\Performance]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64\Names]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64\Performance]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64_2.0.50727]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64_2.0.50727\Names]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64_2.0.50727\Performance]
try installing asp.net 64 bit after that
Configure IIS to run in 32 bit mode (assuming your apps are 32 bit mode, since that's what you originally developed on).
http://learn.iis.net/page.aspx/201/32-bit-mode-worker-processes/
Try running aspnet_regiis after that is done. Use the 32 bit version of aspnet_regiis.
I know this is a fairly old post, but I thought I'd share what I did to solve this problem on my machine running Windows 7 64-bit.
While IIS was installed on my computer, the ASP.NET features were not enabled.
To enable ASP.NET do the following:
Navigate to the Turn Windows features on or off dialog. It's located under
Control Panel --> Programs and Features.
Note: Typing 'features' in the Start Menu search will also get you there.
When the Turn Windows features on or off dialog appears, navigate to World Wide Web Services --> Application Development Features
and make sure ASP.NET is checked.
Once this was done the aspnet_regiis -ir command worked perfectly and I could run and debug ASP.NET apps on my machine.
Hope this helps.
set IIS to run in 32 bit mode
http://learn.iis.net/page.aspx/201/32-bit-mode-worker-processes/
Try running aspnet_regiis after that is done. Use the 32 bit version of aspnet_regiis.
بریده جراید

Resources