How to run DotNetNuke 6.2 under asp.net 4.0 - .net-4.0

I just installed dnn 6.2 fresh as a .net 3.5 application on windows 7 under iis 7.5 using the default app pool. I then go and change the default app pool to .net 4.0, load up my site, and get an iis 7.5 error - IIS 7.5 Detailed Error - 500.21:
...
...
Most likely causes:
Managed handler is used; however, ASP.NET is not installed or is not installed completely.
There is a typographical error in the configuration for the handler module list.
Things you can try:
Install ASP.NET if you are using managed handler.
Ensure that the handler module's name is specified correctly. Module names are case-sensitive and use the format modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule".
Everything I've read on this says to only perform two steps:
change the app pool to run under .net 4.0 (restart app pool)
pull up your site and dnn will make the necessary changes to the web.config file
Note: the default app pool has modify permissions on my website folder and all sub folders/files.
How can I fix this error and get dnn to run under asp.net 4.0?
Thanks for any help!

This happens to me quite a bit when setting up a new machine. You need to register ASP .NET 4.0 with IIS you do that by using
aspnet_regiis
http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx
So go to your .net 4 directory from your command line, path will be something like this.
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319\
then in that directory run
aspnet_regiis.exe -ir
That will re-register 4.0 with IIS and you should be all set.

Related

HTTP Error 502.5 - Process Failure asp .net core 5

I'm having problems visit my site on a browser and this is the error I'm getting (see pic). I'm able to open the project in cli with dotnet project.dll command, what I want is to open it in a browser (like: server.com\project). I published the project in a folder and I also chose self-contained deployment mode. I couldn't find a right solution to questions that were asked. I'm using .net core 5.
The most common reason for this is that you haven't installed the .NET Core runtime on the server.
Check the download page from here Download .NET 5.0 Runtime and SDK

AspNetCoreModule Not Appearing in Modules list for website in IIS, even after installing Windows Hosting Bundle

I am trying to run a .Net Core 2.1 Website through IIS. I had to reinstall IIS recently and was getting the error when navigating to my website:
Handler "aspNetCore" has a bad module "AspNetCoreModule" in its module
list
So I downloaded and installed the Windows Hosting Bundle for the relevant version of .Net Core from here https://dotnet.microsoft.com/download/dotnet/2.1
I then restarted IIS but I am getting the same error.
I noticed in the IIS Modules page for the ASP.Net Core Website I am trying to run, there is still no AspNetCoreModule listed. I take it it should be appearing here after installation of the bundle?
Any ideas what could prevent the installer adding this module?
This error can occur if the AspNetCoreModule is not installed properly in IIS on the computer that is running the Microsoft Dynamics NAV Web Server components. To resolve this issue, open Programs and Features in Control Panel and check whether Microsoft .NET Core Windows Server Hosting is installed. If it is installed, repair it from Programs and Features, by selecting it, choosing Change, and then choosing Repair.
I also noticed that the SDK downloaded in the link you provided has x64 and x86. please check if you had downloaded the correct version.

Restart needed after installing .NET Core Runtime and SDK?

We're about to deploy a netcore 2.0 application on production, but we need to install .NET Core Runtime and SDK first. Is a restart needed for the installation to take effect? Since it's production, we don't want that to happen.
We installed the following from here
x64 Installer (SDK)
x64 Installer (Runtime)
Windows Server Hosting (Runtime)
There was no need to restart the machine and nothing blew up (:
If you are creating a Windows Service using the .NET Core SDK (Microsoft.Extensions.Hosting.WindowsServices) and deploying it in the target machine you need a restart (atleast a log off depending on the application you are running). Here is what happens.
Install .NET Core Runtime
Deploy a windows service.
You will notice that the command line in the windows service will be "dotnet "
Start the service. It will fail because it cannot find the tool "dotnet".
This is because the service control manager (services.msc) is not aware of the dotnet command being added to the path. So you can either do a log off (or)restart to make sure things work.
You could just install Windows Server Hosting Bundle without SDK on your production machine (actually it should be).
But then you'll get 502.3 error, and you could add a element as follows into {YourProject}.csproj file, and then it'll work like a charm.
<PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
Ref: https://github.com/dotnet/coreclr/issues/13542
With respect to either:
.NET 6.0 Desktop Runtime (v6.0.2) - Windows x64 Installer Link
.NET 6.0 Runtime (v6.0.2) - Windows x64 Installer Link
... a reboot is not required.
I didn't have time to test:
ASP.NET Core 6.0 Runtime (v6.0.2) - Windows Hosting Bundle Installer Link
ASP.NET Core 6.0 Runtime (v6.0.2) - Windows x64 Installer Link
... but agree with #MuqeetKhan that you should ideally have both a dev && testing lower environment before performing a production install. (Though, I also understand with smaller co's, that due to constraints & battles lost; this may not be possible.)

How can you get a .NET 4.5 website to run on IIS6?

I've got an old Windows 2003 server running IIS 6, and I chose .net 4.5 for my latest web app. Problem is I can't get it to run on the server...
.NET 4.0 framework is installed. I've run aspnet_regiis and deployed the website. I gave it it's own application pool. But I'm getting the following error:
The 'targetFramework' attribute in the <compilation> element of the Web.config
file is used only to target version 4.0 and later of the .NET Framework (for
example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute
currently references a version that is later than the installed version of the
.NET Framework. Specify a valid target version of the .NET Framework, or install
the required version of the .NET Framework.
I saw the requirements for .NET 4.5 as requiring Windows Server 2008 or later, but I'm seeing lots of posts with people just needing to configure the routing for MVC4 so it seems like this should be possible.
So any ideas what I need to do in order for this to work?
EDIT: The strange thing is we are using an ASP.NET Web API site that works just fine... but that should require .net 4.5...
.Net 4.5 cannot be installed on Windows Server 2003.
Instead, you should use MVC 4.0 on .Net 4.0, which will work fine.

IIS Managed Module in .NET4

I want to write a Managed Module for IIS 7.5 using .NET 4.0 because I want to use the new MemoryMappedFile class.
I started with a small prototype compiled with .NET 4.0 and tried to integrate it into the IIS without success.
The module is strong-named and I could install it into the GAC. After that I added it through the IIS Manager but the worker process doesn't seem to load it as I cannot debug the module by attaching the debugger to w3wp.exe. The AppPool also runs with .NET 4.0.
Any ideas about that?
Thanks,
Simon
I solved it. I had to uncheck the "Invoke only for requests to ASP.NET applications or managed handlers" checkbox. After that the module worked as expected.