I recently updated my ASP.NET web API from targeting .NET Framework 4.5.2 to 4.7. The application runs perfectly fine locally, but I’m facing issues when deploying it to a Windows Server 2022 VM.
Here’s what I’ve done so far:
- I published the application to a folder.
- Manually copied the publish folder to the VM.
- Connected the VM to IIS and deployed the application.
However, I am unable to run the application on the server but can run it locally from vs at the same I am able run previous version of API that hosted in another port. I have ensured that .NET Framework 4.8 is installed on the server, which I understand should support .NET 4.7 applications.
I’m not sure what could be causing the issue or how to troubleshoot it further. Any guidance or suggestions would be greatly appreciated.
Steps I did so far
-
I’ve ensured that .NET Framework 4.8 is installed on the server. However, the application only works over HTTP, not HTTPS.
-
I’ve removed URL rewrite rules from the web.config, which seemed to help, but HTTPS still doesn’t work.
-
I am using the same certificate that was used in the application when the project was targeting .NET Framework 4.5.
I have added correct port and certificate binding
And this certificate was working fine using the same certificate here is causing some issue
1