Could Not Load File or Assembly System.Web.Helpers: How to Fix It
Fix the System.Web.Helpers load error in ASP.NET MVC: restore the Microsoft.AspNet.WebPages package, match the binding redirect, and get the DLL into bin.
By PC MomentUpdated 5 min read

An ASP.NET MVC or Web Pages site on .NET Framework stops with a yellow error page like this:
Could not load file or assembly 'System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Either System.Web.Helpers.dll isn’t in the site’s bin folder, or the version there doesn’t match what the app asks for. The quickest fix is to reinstall the Microsoft.AspNet.WebPages NuGet package, which contains the DLL, and then check that the binding redirect in web.config matches the version you have.
What causes the System.Web.Helpers error?
System.Web.Helpers.dll ships in the Microsoft.AspNet.WebPages package (in its lib/net45 folder, next to System.Web.WebPages.dll and System.Web.WebPages.Razor.dll). Microsoft.AspNet.Mvc 5.3.0 depends on Microsoft.AspNet.WebPages 3.3.0 or later, so any MVC 5 project needs it. The error shows up when:
- The package isn’t installed or restored. The reference is broken, so nothing is copied to
bin. - The versions don’t match. The app or a library asks for one version,
binhas another, andweb.confighas no redirect (or the wrong one). This often follows an MVC 4 to MVC 5 upgrade, when System.Web.Helpers moved from 2.0.0.0 to 3.0.0.0. The message can then end with “The located assembly’s manifest definition does not match the assembly reference.” - The DLL wasn’t deployed. The site runs on your PC but fails on the server because the file never made it into the published
binfolder.
Note: The NuGet package version and the assembly version are different numbers. Microsoft.AspNet.WebPages 3.3.0 (the latest on nuget.org) contains System.Web.Helpers with assembly version 3.0.0.0. Binding redirects use the assembly version.
Quick fix summary
| Fix | When it helps | Risk |
|---|---|---|
| Reinstall Microsoft.AspNet.WebPages | DLL missing from bin, broken reference after restore | Low; Update-Package -reinstall may also update dependencies |
| Correct the binding redirect | “Manifest definition does not match” or after a package update | Low if you match the version in bin |
| Set Copy Local and redeploy | Works locally, fails on the server | Low |
| Read the fusion log | You still can’t tell which assembly or version fails | None; turn logging off afterwards |
How to fix it
Fix 1: Reinstall the Microsoft.AspNet.WebPages package
- In Visual Studio, open Tools > NuGet Package Manager > Package Manager Console.
- If the package isn’t installed yet, install it:
Install-Package Microsoft.AspNet.WebPages
- If it’s installed but the reference is broken, reinstall the same version:
Update-Package -Id Microsoft.AspNet.WebPages -reinstall
Microsoft’s NuGet documentation recommends this for broken references after a restore or deleted package files. It applies to projects that use packages.config; for projects that use PackageReference, a restore fixes broken references. Be aware that -reinstall puts back the same version of the package but the latest allowed versions of its dependencies.
- Rebuild the project and check that
bin\System.Web.Helpers.dllexists.
Tip: Back up
web.configandpackages.configbefore reinstalling packages, or make sure they’re committed in source control so you can compare the changes.
Fix 2: Match the binding redirect to the DLL in bin
First, find out which version you actually have. In PowerShell, run (change the path to your site):
[System.Reflection.AssemblyName]::GetAssemblyName("C:\inetpub\wwwroot\MySite\bin\System.Web.Helpers.dll").FullName
This reads the assembly’s name, version and public key token from the file without loading it into your app. For the 3.x packages you’ll see Version=3.0.0.0 and PublicKeyToken=31bf3856ad364e35.
Then open the application’s root web.config (not the one in the Views folder) and find <runtime>/<assemblyBinding>. For MVC 5 it should contain entries like these, from Microsoft’s MVC 5 upgrade guide:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
After you edit it, paste the <runtime> block or the whole file into our XML formatter to catch a missing closing tag or an unquoted attribute, since a web.config that isn’t well-formed breaks the whole site.
oldVersion can be a single version or a range; newVersion must be the single version that’s in bin. Any request for a version in the range is sent to newVersion. If the newVersion doesn’t exist in bin, you’ll get the same error, so match it exactly.
Also check the webpages:Version setting under <appSettings>. For MVC 5 the upgrade guide sets it to 3.0.0.0:
<add key="webpages:Version" value="3.0.0.0" />
Tip: For web projects, Visual Studio shows a build warning when it finds conflicting versions of an assembly, and the warning gives you the option to add the needed binding redirect to
web.config.
Fix 3: Make sure the DLL is deployed
If the site works on your machine but not on the server:
- In Solution Explorer, expand References and select System.Web.Helpers.
- In the Properties window, set Copy Local to True.
- Rebuild and publish again.
- On the server, confirm that
System.Web.Helpers.dllis in the site’sbinfolder.
Microsoft’s documentation explains why this happens: Copy Local defaults to False when Visual Studio resolves an assembly from the global assembly cache (GAC). If your PC has the assembly in the GAC and the server doesn’t, the build skips the copy and the server can’t find the file.
Fix 4: Find the exact failure with the fusion log
When you can’t tell which version is requested or where .NET looked, use the Assembly Binding Log Viewer.
Important: Fuslogvw.exe must run with administrator rights. Open the Developer Command Prompt for Visual Studio as administrator (see how to open an elevated command prompt).
- Run:
fuslogvw
- Select Settings, choose Log bind failures to disk, and select OK.
- Reload the failing page, then select Refresh in the viewer (it doesn’t update on its own).
- Double-click the entry for System.Web.Helpers. The log shows the requested version and public key token, which policy was applied, whether the GAC had it, and every path .NET probed.
- When you’re done, go back to Settings and select Log disabled, which is the default.
If it still doesn’t work
- Check the “or one of its dependencies” part. System.Web.Helpers itself references System.Web.WebPages 3.0.0.0. If that one is missing or mismatched, the fusion log will name it. Reinstalling the package (Fix 1) restores both.
- Compare every project. A class library that references an older Microsoft.AspNet.WebPages can bring an old version into the build. Use the same package version in all projects.
- Clear and rebuild. Delete the project’s
binandobjfolders, then rebuild and republish so no stale DLL is left behind. - Undo a bad edit. If a web.config change made things worse and you already committed it, see how to undo the last commit in Git.
- Escalate. If it only fails on a shared server you don’t control, ask the hosting admin to confirm the site’s
binfolder contents and the .NET Framework version of the application pool.
More developer fixes are in the programming guides. If you work in the console a lot, our Command Prompt shortcuts guide saves typing.
Frequently asked questions
Which NuGet package contains System.Web.Helpers.dll?
Microsoft.AspNet.WebPages. Its lib/net45 folder contains System.Web.Helpers.dll along with System.Web.WebPages.dll and System.Web.WebPages.Razor.dll. Microsoft.AspNet.Mvc depends on it, so installing MVC normally pulls it in.
What version is System.Web.Helpers in MVC 5?
With the Microsoft.AspNet.WebPages 3.x packages that MVC 5 uses, the assembly version is 3.0.0.0, and Microsoft's upgrade guide uses a binding redirect from 1.0.0.0-3.0.0.0 to 3.0.0.0. The NuGet package version (such as 3.3.0) is not the same as the assembly version.
Which web.config gets the binding redirect?
The application's root web.config, inside configuration/runtime/assemblyBinding. Microsoft's upgrade guide says to make these changes in the app web.config, not the one in the Views folder.
Why does the site work on my PC but not on the server?
Usually the DLL never reached the server's bin folder. If Visual Studio resolved the reference from the global assembly cache on your PC, Copy Local defaults to False and the file isn't copied to the output, so the server can't find it.
Does this error apply to ASP.NET Core?
No. System.Web.Helpers belongs to ASP.NET MVC and Web Pages on .NET Framework, and Microsoft.AspNet.WebPages targets .NET Framework 4.5 and later. Binding redirects are also a .NET Framework feature.
Related guides

Programming
'pip' Is Not Recognized as an Internal or External Command: How to Fix It on Windows
Windows can't find pip because its folder isn't on PATH. Run py -m pip instead, then fix PATH, the app execution aliases or your virtual environment.
6 min read

Programming
Fatal: Not a Git Repository: What It Means and How to Fix It
Git says "fatal: not a git repository" when it can't find a .git folder. Here's how to find the right folder, start a repository, and fix GIT_DIR, submodule and ownership problems.
7 min read

Programming
Git Rename Local Branch (and the Remote Branch Too)
Rename a local Git branch with git branch -m, then update the remote branch and its upstream, rename it on GitHub, or switch master to main.
5 min read

Programming
Git Undo Last Commit: Reset, Revert, Amend and How to Get It Back
Undo your last Git commit the right way: keep the changes, throw them away, or reverse a commit you already pushed, plus how to recover from a bad reset.
8 min read