Common error: failed to Load file or assembly

Source: Internet
Author: User
Problem description:
Today, I encountered a strange problem. After using the factory model, I went out and couldn't find the Assembly:
Failed to Load file or assembly "tianyige. sqlserverdal" or one of its dependencies. The system cannot find the specified file.

Solution:
I have encountered such problems before. The problem is that the names of the assembly and namespace are confused. For example, the namespace is called sqlserverdal, and the Assembly may be called tianyige. sqlserverdal, or "sqlserverdal", will cause an error where the object cannot be found. The solution is to correspond to the Assembly Name:
Assembly. Load ("tianyige. sqlserverdal"). createinstance ("tianyige. sqlserverdal. Category"); find the corresponding DLL in the bin folder and confirm its name.
This time, the name has been matched. It seems that I have spent all my eyes on it. No error at all, but there is still a problem. Finally, copy the DLL file [tianyige. sqlserverdal] in the error prompt to the bin directory under the website app. The problem can be solved.

Reflection:
Why do I have to copy the file to the bin folder under the app? Is it because tianyige. sqlserverdal must be called directly during app generation?
You may encounter similar problems in the future ......

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.