Is there a version of ELMAH for .NET 4? - .net-4.0

I'd like to use ELMAH in an ASP.NET MVC 2 application running on .NET 4, but according to the project hosting site on Google code, it only supports .NET 1.1 and 2.0.
Is there a .NET 4 version of ELMAH already, or do I have to download the source and update whatever breaks myself?

Elmah works perfectly fine for ASP.NET 4.0.
However, there are a few tricks in getting it setup to work perfectly on an MVC website.
I have recently starting blogging about this topic so be sure to check out my blog series on logging in MVC. The first article covers getting Elmah set up and running for MVC using all the tricks that you can find about it on StackOverflow.
There is a link to downloadable code at the end of the article. Hope that helps.
http://dotnetdarren.wordpress.com/

I am using .NET 4.0 and I dont about a new version.... but I am using the elmah 1.1 and it works....:)..You may have to change source though to add custom fields or log additional values..which is bit of a pain...but get started here

Well it's open source nothing should prevent you from recompiling it using the .NET 4.0 framework.
This link has some information about running pre .NET4 web apps and .NET4 web apps in a server.
EDIT:
Actually you won't need to recompile ELMAH. According to this and this article the In-Process side by side execution should do the trick.

I had the same question so I downloaded the 1.1 src, opened it up in visual studio 2010, changed the project to target 4.0 and rebuilt it. I then dropped the dll in my ASP.NET MVC 2.0 app and it has worked fine.

Related

ASP.NET Core Web Application with .NET Framework, I want to switch the target to .NET Core

I'm trying to change ASP.NET Core web application with .NET Framework as a target framework to use .NET Core 3.1.X
I try changing the target framework in the project file (.csproj), I encounter dependency issues, dependency conflict....
Is there any straightforward method to solve this issue?
Before you start your migration, you should know there’s several difference between .net framework and .net core, so please follow the official document to do some Pre-Migration steps.
Then you can follow this official document to migrate your application from framework to .net core 3.1.
Since your ideal .net core version is 3.1, still I suggest you can try to use .net 6. Also, you can use this upgrade tool to reach your goal. In fact, using this upgrade assistant is a batter choice than you doing it by yourself. Even if you are insisting using .net core 3.1, you can use this assistant to upgrade your version to 6 first then change it to 3.1.
Note:
Before you start your migration, please make a backup of your original project. That's because some packages in .net framework may be no longer available in .net core. So if there're some errors occur, you can go back to the original one.

Is the ASP.NET Core NuGET package Microsoft.AspNetCore.Hosting version 2.2.7 part of ASP.NET Core 5.0?

I am getting a little confused by all the naming and versioning of .NET. I think I understand the whole .NET Framework / Standard / Core thing, but I am now moving into ASP.NET Core territory (I want to give my console application a web interface with Kestrel).
When using the NuGET package manager, I can see the Microsoft.AspNetCore.Hosting package, needed to run the webserver. But the highest available version is 2.2.7.
Question now, is that 2.2.7 part of ASP.NET Core 5.0, or do I have some configuration incorrect that I do not get the latest version for my application?
And if it is indeed part of ASP.NET Core 5.0, where can I find that reference? This table helped me a lot with understanding the core libraries.
I assume you wanna this document which tells about your package :
https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.hosting?view=aspnetcore-5.0
And I think you can focus on those classes or interfaces you'll use and take a look if those are supporting .net 5 by click and refer to the details page. You'll see Applies to at the bottom of each page such as this one.
If I misunderstood in some place which made my post isn't suitable to display here, pls point it out and I'll delete it.

How to create report(e.g. PDF,Excel,Word) in ASP.NET Core 1.0?

I want to create report(e.g. PDF,Excel,Word) in ASP.NET Core 1.0,
but NPOI and OpenXML is not support ASP.NET Core.
There is an issue for .NET Core support for OpenXML (https://github.com/OfficeDev/Open-XML-SDK/issues/65). Some work has to be done before it is ready. Someone who had your demand as well ported it to .NET Core and published his project on GitHub (https://github.com/xrkolovos/Open-XML-SDK-for-NET-Platform-Standard). I have not tried it myself, but it may be worthwile to try.
UPDATE:
Current releases of OpenXML support .NET Core. Therefore the second GitHub project is obsolete now.
For PDF PdfReport.Core could be a solution. I can confirm that it works under netcoreapp1.1. It also should be able to export to Excel, XML and CSV (NOT tested by me).
Please check my answer here:
https://stackoverflow.com/a/42023039/1719087
There is a CI build that works with .Net Core 1.1 at
https://github.com/OfficeDev/Open-XML-SDK
the specific nuget package is at this feed:
https://dotnet.myget.org/F/open-xml-sdk/api/v3/index.json
If your application is fine to run on windows only, then using ASP.NET Core with the full .net framework let you use NPOI and OpenXML. With this approach you can start now with the new Microsoft web framework in the hope that NPOI or OpenXML will support .NET Core in the near future.

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.

Setting up MVC 4 (Razor) with MonoDevelop

I'm trying desperatly to setup a MVC 4 (in the worst caes 3) with Razor on Monodevelop. I'm sitting on a Mac OS X machine, with Mono 2.11.4.
It seems to not have all the assemblies required. System.Web.Helper for instance, doesn't seem to be found. And MonoDevelop can only find System.Web.Mvc version 3 (With NET framework 4.5 selected) or version 2 (with NET Framework 4.0 selected). Does anyone know how to get MVC 4 with Razor to work?
(Razor pages worked with Mono, in theory, with version 2.10.x series, but you had to bundle Microsoft's assemblies with it into your Linux box.)
Since Mono 2.11.1, these assemblies are now bundled by default in Mono, because Microsoft open sourced Razor recently (on March 2012). So: you're using the correct version of Mono.
The catch is that, as explained in this blogpost, MVC4 depends on the async ASP.NET API stack, which is not ready yet in Mono. So yes you can now use Razor with Mono without the need to deploy MS assemblies from Windows, but, you need to stick with MVC3, not 4, for now.
(Copy-pasted my answer from this other stackoverflow question and tweaked it a bit.)
I modified the VS2010 MVC4 Project Template to run out-of-the-zipfile in Xamarin Studio/MonoDevelop on Mac & Linux: http://www.cafe-encounter.net/p1319/run-asp-net-mvc4-on-mono-monodevelop-on-mac-the-c-template-project.
Update: I've done a MVC4 on .Net 4.5 template with notes at http://www.cafe-encounter.net/p1510/asp-net-mvc4-net-framework-version-4-5-c-razor-template-for-mono-on-mac-and-linux including link to github.
According to the Compatibility page on the Mono site MVC4 is supported with the exception of the async features. Unless there is a part of the MVC4 framework that is uses async by default, then those new features will only be a problem if you have added that pattern to your code.