Failed to load file or assembly "xxx" or one of its dependencies. An attempt was made to load an improperly formatted thread

Source: Internet
Author: User

DLL has, 32-bit, the system is 64-bit. This has a setting in IIS as follows:

Let's take a look at which application pool the project uses:


Then go to the application pool to configure


Set enable 32-bit application to True

OK, fix it. Then browse everything normal.

Here are also notes on the deployment of the MVC3 application in IIS7:

1. Add MVC Parsing

First make sure that the ASP. NET MVC3 is installed, and then check the site's handler mappings to see if the following mappings exist:

extensionlessurlhandler-integrated-4.0

Extensionlessurlhandler-isapi-4.0_32bit

Extensionlessurlhandler-isapi-4.0_64bit

If the mapping exists, check to see if the application is assigned to the. NET Framework4.0 application pool.

If the mapping does not exist, you can register with the administrator to run the following command:

32-bit machine:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe-i

64-bit machine:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe-i

2. Then check the bin directory for SYSTEM.WEB.MVC. DLL. If not, copy it in, or follow the method above to regenerate the project.

3.ASP. NET version selection 4.0.30196;

Failed to load file or assembly "xxx" or one of its dependencies. An attempt was made to load an improperly formatted thread

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.