Could Not Load Files or Assembly System.Web.Helpers
Could not load files or assembly System.Web.Helpers are one of many kinds of errors and their solutions are always similar. There are two major causes of these kinds of errors 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 errors will occur. Logically, the solution will be that you enable the 32-bit application on IIS. That is logical.
Another way to solve the problem is by making the application compatible with the bit of the operating system on your computer. So dive right in and implement these solutions one after another.
Contents
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 pools below the main directory at the left-hand side of the screen.
Right-click on DefaultAppPool and select Advanced Settings.
Under the General tab in the advanced settings, you will see Enable 32-Bit Application. Set it to True and hit the OK button. With these simple steps, you have enabled the 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. On 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 the 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 the ‘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:
Step 1
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 lines 9 to 11.
Notice the version number you find there. It is usually something like version 5.2.2.2.0
Step 2
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, and 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 do not work.
Could Not Load Files 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 after installing SQL Server in May 2012 or so, I tried to put it to use by connecting it to an MVC application. After all the basic settings and connecting to the database then I got the ‘could not load file or assembly Microsoft.SqlServer.Management.Sdk.sfc’ error. This error is related to the 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 which is why I downloaded SQL Server 2014. If you are using SQL Server 2010 you should download and install the 2012 service pack 1 feature pack.
You can search Google for the download link or Use the link that leads to the 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 the ‘Could not load file or assembly System.Web.Helpers’ error will help you. I very much expect you to be able to tweak the solution here for other related errors too.