New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET 6 Web API not working without .NET Core 2.1 Runtime in the server. #41837
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
The CORS package is an old version and does not seem to be required. Have you tried removing it and running the application again? Same with the two packages at the bottom. If you only target .NET 6 you don't need them. |
yes, I am checking, how about the "Microsoft.IdentityModel.Tokens" and "System.DirectoryServices.Protocols" it has dependencies with .NET Standard 2.0? |
This is likely your issue, remove that reference. The Tokens and Protocols packages should be fine. |
I have tried that as well and it did not help much. Problem with
So Please let me do you have any road map to remove 2.1 framework dependency? |
You shouldn't be worried about libraries targeting unsupported .NET Core versions. A library targeting .NET Core 2.1 means it can run .NET Core 2.1 or newer. It is your main executable app that needs to target a sufficiently new framework version. And this package is getting regular updates which means that it is supported. |
Yes, But our application is not working if we don't install .net core 2.1 Runtime. May be due the above reference to 2.1 core . |
Can you give us the error message you are getting? |
Getting 500 internal error and when I check the event logs, it says .netcore 2.1 not found error. |
@ponkumarpandian Can you paste the exact error message, or screen shot it. It's a bit ambiguous right now. |
@davidfowl Here is the details error message when run the api on the server with localhost url. I have attached the portion of my application dependency json content (highlighted in bold) which has a .NETCore2.1 framework dependency. IIS Version : 8.1 Error:
|
@davidfowl Here is my web.config and detailed error message. As I mentioned earlier Please let me if you need any further information.
|
Just wanted to give update on what I understood on this issue, I have manually upgraded the following packages to latest version and it is started working, But the question is, when we upgrade Microsoft.EntityFrameworkCore.SqlServer to latest version, it's dependencies also should upgrade to the latest version. Please let me know what is the expected behaviour on this? |
Sorry I was wrong, I am still getting same error even though I upgraded to the latest one. I just cross verified my server had Can someone please let me know the work around? I am running out time , need to resolve as soon as possible otherwise my application need to be go down. It will be great if someone respond this issue quickly. Here are the .NET Runtime installed on my server. @davidfowl @teo-tsirpanis please help me to resolve this issue. |
There are two errors shown above, the one about the bad module and the one about |
@adityamandaleeka Bad module error resolved once I update the web.config with |
@ponkumarpandian Can you clarify what you mean by the netcoreapp2.1 dependency? What are you referring to and why you think it's relevant to the error? |
@davidfowl Please refer to the below screenshot, Please let me know if you need further information and help me to resolve this issue as soon as possible. |
It looks like the Microsoft.Identity.Client library only supports netcoreapp2.1 and net5.0-windows10.0.17763 (https://www.nuget.org/packages/Microsoft.Identity.Client/4.44.0). Unfortunately, there's nothing we (ASP.NET Core) can do about that. Can you file this issue over at https://github.com/AzureAD/microsoft-authentication-library-for-dotnet so that they can add net6 support? .NET 5 is now out of support. |
@adityamandaleeka You mean if I target my application to .Net 5.0 and deploy the application to server without .netcore 2.1 framework, will it work? |
This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes. See our Issue Management Policies for more information. |
We are using below nuget packages for our WebAPI project. Since .NET Core 2.1 support has been end, as per our organization policy we are suppose to remove the .NET Core 2.1 runtime from the server as this is consider as a vulnerability. But we uninstall the .NET core 2.1 version , application not working and getting 500 internal server error .
Project 'XXX.YYY.ABC.FFF.Service' has the following package references
[net6.0]:
Top-level Package Requested Resolved
The text was updated successfully, but these errors were encountered: