Http Request Error when C# Project Target to .Net Framework 4.8 in Window 7 - httprequest

My C# Project Target .Net Framework 4.6.1 before, and working fine in window 7,8.1, and 10. But now I changed my target framework to .Net Framework 4.8, Window 8.1, and 10 still no problem but window 7 error in HTTP Request.
"An error occurred while making the HTTP request to https://Test.123.com/API/ServiceRouter.svc. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server."
Remark:
The Http Request Action is just receive some Data from my service
.Net Framework 4.8 already installed in window 7 (SP 1) platform.
Nothing changed to code at all

Great Chau Chun. This code solved my problem:
"System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;"
Thanks.

Related

error 500 on plesk(hosting) with my .net core webapi but work good in test (localhost) help me pleaaase

I have written an ASP.NET Core Web API, and published it on my plesk (hosting) web server, but it is not working - it is working in my test environment (localhost).
Important to know that my plesk (hosting) server use the version 4.8 of the .NET Framework and my API uses .NET Core 6; is that the reason it doesn't work? (I use the version 4.8 cause my web server host a website in webforms).
Here's the url to access the api on the web that throws an error 500 (any call return that)
https://apinhl.nhldynastypool.com/NHLAHLStatsAndSalaryInfo
In the screenshot below, I will post the file tree that I have in plesk (hosting) maybe it has something to do.
I have tried many thing but nothing seems to work I really need your help I do not have a clue what to do now it is the first time I try to deploy a web api and sorry for my bad English my main language is French :)
No cause i have to go to .net core 2.1 to work on .net framework 4.8 and all my code broke lol so i guess i have no other chpice to rewrote it in .net 4.8 framework in a webapp project

.Net Core Upgrade To 5 - Version doesn't map to a known HTTP protocol

We upgraded our asp.net core 3.1 web app to version 5. It's hosted in IIS. All servers are fine. We go to production and we can't stay stable because of the following error at the bottom. Just flurry of errors so we had to roll back until we can resolve this issue.
Looking at the breaking changes from 3.1 to 5 - I'm still not spotting anything. Looking at the Microsoft source code I'm still not sure how the error would come about. Any help would be appreciated.
An unhandled exception was thrown by the application.
System.ArgumentOutOfRangeException: Version doesn't map to a known HTTP protocol. (Parameter 'version')
at Microsoft.AspNetCore.Http.HttpProtocol.GetHttpProtocol(Version version)
at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContext.Microsoft.AspNetCore.Http.Features.IHttpRequestFeature.get_Protocol()
at Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware.IsEmptyHostAllowed(HttpContext context)
at Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContextOfT`1.ProcessRequestAsync()

HTTP 500 error launcing ASP.NET 3.0 application

I have just upgraded our ASP.NET Core 2.2 web application to 3.0. It builds and deploys fine. The problem is when I go to run it from our IIS server. This was running perfectly fine as a Core 2.2 web app, but now fails since upgrading to Core 3.0.
When I launch the web app from the commandline there are no reported errors.
When I launch the application from the browser the Windows logs indicate that the app started correctly.
The app then fails with an HTTP 500 error. Here are the IIS log entries.
We're using Windows Server 2012 R2 with IIS 8.5.9600.16384
The app appears to start correctly but then fails with an HTTP 500 error. Has anyone else seen this or something similar? Any ideas how to diagnose / fix the problem?
UPDATE
I've attached the VS 2019 debugger to the deployed app via the w3wp.exe process and it's not even hitting any of the middleware (I have a breakpoint at Startup() in Startup.cs).
I've tried changing the application pool settings e.g. identity, .NET version but to no avail.
When I launch the site from the web server I get the following error message which doesn't really tell me anything.
I can't see what's causing the problem.
.NET Core 3.0 uses the in-process hosting model by default. You may need to upgrade the .NET Core Hosting Bundle.
You will check web.config "aspNetCore"
<aspNetCore processPath="dotnet" arguments=".\Api.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
maybe proccessPath is wrong.
if it doesn't solve problem , write to log step step startup.cs.
Maybe throw error in startup.cs
After investigation and comparison of the build artifacts that the build produces vs the deployed app, I discovered that the appsettings.json was not being deployed. No idea how or when this started failing, but it caused the app to generate an HTTP 500 error message. Our app's Azure ADB2C settings are contained in this file so it was crashing trying to authenticate but couldn't find the authentication settings.
There was no obvious error being generated and everything seemed to be loading fine. It was at the point at which the app was trying to authenticate that it was failing. All working now.

Windows Server 2003 64bit IIS 6.0 Service Unavailable

I created a MVC 4 Web Api and ran all the configurations to get it running, but I get the error mentioned above.
The event log says I am running two version of .NET
I have enabled 32 bit applications on the server
This is the proof of .NET 4 Registration:
This is the error I am getting:
The setup for above error:
Clicking on configure from above screen:
Clicking on edit:
If I change the wildcard mapping dll to the follwing
I get this error, as you can see it says I am running version 2 of .net which is not true according to the first screenshot, I have tried iisreset to not avail:
The wild card mappings are used for clean url's when using MVC 4 web api.
This is the setup in IIS:
Can someone maybe guide me to a solution for this?
EDIT:
These are the resources for the initial setup I did:
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
http://johan.driessen.se/posts/getting-an-asp.net-4-application-to-work-on-iis6
Basically the IIS has framework 4 registered but it is using framework 2 when I try and load the api.

DNN 5.01 Internal Server Error 500 with .NET Framework 4.0

I have a DNN 5.01 installation and upgraded the server so it used .NET Framework 4.0 as i wanted i wanted to get a DNN module working on a portal.
The problem is when i change the application pool for that that installation to use .net 4 the site comes up with a generic error 500 internal server error.
IF i select .net version 2.0 the site works again.
I am also getting errors like these when i double click on icons such as "Error Pages" in IIS 7.5.
My web.config file is below:
enter link description here
edit:
The updated web.config seems to allow the site to work under .net 4 but the login controls dont show up! :(
updated webconfig file