.NET Framework 4.6.2 ends on 12 January 2027: retargeting a Web Forms site to 4.8.1, step by step

On 12 January 2027, .NET Framework 4.6.2 reaches the end of its support. Microsoft's lifecycle table gives the exact cut-off: 13 January 2027 at 06:59 UTC, which is the end of 12 January in Redmond. After that date, a Web Forms site still compiled for 4.6.2 gets no more security fixes for that version. The fix is usually small, because 4.8 and 4.8.1 are in-place updates of the same framework, but it is worth doing carefully, a few weeks ahead, rather than on the morning of the deadline. Here is the routine, from checking the server to redeploying.
What exactly ends, and what does not
The .NET Framework lifecycle page lists 4.6.2 with an end date, and 4.7, 4.7.1, 4.7.2, 4.8 and 4.8.1 without one: those later versions follow the support of the Windows release they are installed on. Versions 4.5.2, 4.6 and 4.6.1 already retired on 26 April 2022, because, as Microsoft's announcement at the time explained, they had been signed with SHA-1 certificates.
Two things are easy to confuse here. The installed framework on the server is one; the target framework your project is compiled for is the other. Most Windows servers patched in the last few years already run 4.8 or 4.8.1, and an application targeting 4.6.2 runs on them in compatibility mode. Retargeting means changing what your project declares, so that you get the current behaviour and stay on a supported target.
This is a different question from the end of .NET 8 and .NET 9, which lost support on 10 November 2026: those are the cross-platform runtimes, and Web Forms does not run on them. Our table of .NET support dates puts all the versions side by side.
Step 1: check what the server has
Microsoft documents the registry check in Determine which .NET Framework versions are installed. The value to read is Release under HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full. In PowerShell, on the web server:
Get-ItemPropertyValue -LiteralPath 'HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' -Name Release
Compare the number with the minimum values in the same article: 528040 or more means 4.8 is installed, 533320 or more means 4.8.1. Always test with "greater than or equal", never with an exact match, because the value differs from one Windows build to another.
If the server is below 528040, install the framework first (4.8.1 needs a recent Windows; check the versions and dependencies page for your Windows Server release), reboot, and run the check again. The installer for developers and servers is on the .NET Framework 4.8.1 download page.
Step 2: retarget the project
- Install the targeting pack on your development machine: in the Visual Studio Installer, add the ".NET Framework 4.8.1 targeting pack" (or 4.8). Visual Studio's framework targeting overview explains how the IDE picks it up.
- Change the target: project Properties, Application tab, Target framework, choose 4.8.1. For a Web Site project (no .csproj), the target is the
targetFrameworkattribute of the<compilation>element inweb.config. - Check
web.config: Visual Studio updates<compilation targetFramework="4.8.1">but not always<httpRuntime targetFramework="...">. Set both. ThehttpRuntimevalue is the one that switches ASP.NET to the newer behaviours, such as the request validation and encoding defaults introduced since 4.5. - Retarget NuGet packages: packages installed under 4.6.2 may reference a
net462folder. In the Package Manager Console,Update-Package -Reinstallre-resolves every package for the new target; the NuGet documentation on reinstalling and updating packages warns that it rewritespackages.config, so commit first. - Rebuild and read the warnings, not only the errors.
Step 3: the behaviours that change
Between 4.6.2 and 4.8.1, Microsoft lists every "retargeting change" in its application compatibility pages. Most will not touch a typical Web Forms site; three deserve a test:
- TLS. Code that forced
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12(or worse,Tls) should usually drop that line: Microsoft's TLS best practices recommend letting the operating system choose, which allows TLS 1.3 where Windows supports it. Test every outgoing call: payment gateway, SMTP, web services. - Cookies and SameSite. Later 4.x updates changed how the
SameSiteattribute is written. If your login breaks inside an iframe or after a payment redirect, look there first. - Accessibility of controls. Some Web Forms and WinForms controls render slightly different markup for screen readers. Check pages with custom CSS that targets generated IDs or tags.
Run the full test pass on a staging server that has the same Windows and framework version as production, then deploy. If you deploy by copying files, remember that the compiled bin folder and web.config must go out together.
Shared hosting and older servers
On shared Windows hosting you do not control the installed framework. Ask the host which Release value its servers report, or deploy a one-line test page that prints System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription, which Microsoft's version article also documents. If the host still runs a server that cannot take 4.8, that is a reason to move host, not to stay on 4.6.2. The same steps apply to VB.NET projects: only the project properties screen looks different.
A short checklist
- Server
Releasevalue checked: 528040 or more (4.8), ideally 533320 or more (4.8.1). - Targeting pack installed, project retargeted, both
targetFrameworkattributes inweb.configupdated. - NuGet packages reinstalled for the new target, changes committed separately.
- Forced TLS settings reviewed, outgoing calls tested.
- Logins, cookies and any iframe or redirect flow tested on staging.
- Deployed before 12 January 2027.
Retargeting is also a good moment to look at the rest of the stack: connection strings and secrets (see our notes on appSettings and connectionStrings in web.config) and the parameterised queries that keep a data layer safe, covered in what SQL injection is and how to prevent it. For a longer path off Web Forms altogether, the .NET Framework migration guide is the starting point.