Could not load file or assembly System.Web.Helpers is one of many kinds of errors and their solutions are always similar.
There are two major causes of these kinds of error though:
One: when a 32-bit application is trying to use a 64 bit IIS. If the operating system on your computer is 64-bit and you are trying to run a 32-bit application and the 32-bit application isn’t enabled on the IIS these kinds of error will occur.
Logically, the solution will be that you enable the 32-bit application on IIS.
That is logically.
Another way to solve the problem is by making the application compatible with the bit of the operating system on your computer.
Enable 32-Bit Application On IIS To Fix Could Not Load File or Assembly System.Web.Helpers Error
Open your IIS and right-click on the Web (where your website files are located).
You will select the application pool of your website by clicking on the Advance Settings.
From the picture above, my application is DefaultAppPool
So now you’ll go back to the list of Application pool below the main directory at the left hand side of the screen.
Right-click on DefaultAppPool and select Advance Settings.
Under the General tab in the advance settings you will see Enable 32-Bit Application. Set it to True and hit the OK button.
With this simple steps, you have enabled 32-Bits application on IIS.
Now move on to the second solution.
Change The Target Platform of the Application
Please note: only implement this solution if the first one doesn’t work.
At the right hand side, right-click on the project name and select Properties.
In the Properties section, locate the Build menu and change the Configuration to the right option.
What is the right option?
If you are publishing the site on Debug or Release configuration, put it there.
And set the Platform Target to x86 then publish the site.
That is a simple way to change the target platform and make it compatible with 32 bit operating system
Don’t forget to save all the changes.
Could Not Load File or Assembly ‘System.Web.Mvc’
This is another error that is related to ‘could not load file or assembly System.Web.Helpers’.
This error is a version related one and just simply modifying the version number will solve the error.
Here is the solution to the error:
On the Visual Studio application locate the web.config file of the application you are working on.
In the source code of the web.config file, you will find where the version is mentioned, around line 9 to 11.
Notice the version number you find there. It is usually something like version 220.127.116.11.0
On the right hand side where you locate the web.config file, I mean the Solution Explorer panel, click on the arrow before the References option.
Among the items under the References option is System.Web.Mvc. Locate and right click on it.
Select Properties, the properties panel will show up.
Since we are solving the System.Web.Mvc Version error here, just notice the version number in the properties section then go back to the web.config source and change the number to what you see in the Properties panel.
Then save the code.
Reload the application or your web page and the error will be gone.
Could Not Load File or Assembly System.Web.Helpers
You can definitely use the idea of System.Web.Mvc to solve Could Not Load File or Assembly System.Web.Helpers error too.
Go through the steps above again and add some creativity to it especially in the References section. The System.Web.Helpers file is there. Open it and see if you can correct what is wrong from there.
I believe you can solve it like that.
Refer to the next related solution should incase all the ones above does not work.
Could Not Load File or Assembly Microsoft.SqlServer.Management.Sdk.sfc
How does this ‘could not load file or assembly Microsoft.SqlServer.Management.Sdk.sfc’ error take place?
This is it…
After installing SQL Server may 2012 or so, and I try to put it to use by connect it to a Mvc application.
After all the basic settings and connection to the database then I got the ‘could not load file or assembly Microsoft.SqlServer.Management.Sdk.sfc’ error.
This error is related to version in one way or the other. However, the first solution on this page cannot solve this one.
So what can you do to get rid of this error?
In my case, I downloaded Microsoft SQL Server 2014 Feature Pack. Remember that I am using SQL Server 2012 that is why I downloaded SQL Server 2014.
If you are using SQL Server 2010 you should download and install 2012 service pack 1 feature pack.
You can search Google for the download link or Use the link that leads to Microsoft website.
You will get this feature in different files, so just download Shared Management Object.msi and SQLSysClrTypes.msi.
Download these two files and install both of them.
Restart your visual studio and use the application as you normally do. And I promise you that the error will be gone.
I hope that this short guide on how to solve ‘Could not load file or assembly System.Web.Helpers’ error help you. I very much expect you to be able to tweak the solution here for other related errors too.
Thanks you for reading and have a blessed time.