In general, this problem occurs because the. dll file does not exist or the path is incorrect. But the situation I encountered today is not in these two. I am sure that the. dll file exists and the path is correct. But the program anyway is "failed to load file or assembly" error. Helpless under had to help the network, soon in "CSDN" found the following posts:
Workaround for "Failed to load file or assembly"-Dreamman-dreamman i downloaded a asp.net program on the server to the local Machine XP system, set up the virtual directory and opened it with the browser, all normal. But when I reboot the computer, it opens again. "Failed to load file or assembly" XXX, version= resolution on "Failed to load file or assembly"-Dreamman-dreamman. " Or one of its dependencies. The system could not find the specified file ... System.IO.FileNotFoundException ". Through Baidu and Google search a lot of relevant information, the common solution is:
Workaround for "Failed to load file or assembly"-Dreamman-dreamman method one, stop Indexing Service
Workaround for "Failed to load file or assembly"-Dreamman-dreamman method Two: Configure ASP.net temporary directory not affected by Indexing Service services
Workaround for "Failed to load file or assembly"-Dreamman-dreamman method Three: Delete pdb files in bin directory
Workaround for "Failed to load file or assembly"-Dreamman-dreamman method Four: Modify Windows\Temp directory permissions, set asp.net Machine account for Full control of this directory
Deactivate the indexing service, or configure the asp.net temporary directory to be unaffected by indexing service services.
Configuring the asp.net temporary directory to be unaffected by the indexing service services is the following steps:
& nbsp;
1, start -- management tools -- Computer Management (Win2003 location, Other operating systems similar) turn on Computer Management
2, expand the Services and Applications node in the left tree of Computer Management, expand the Indexing Service node under it, expand the System node under it, and then expand the directory node below it.
3, on the right side of the computer Management, we can see the configured Indexing Service directory.
4, right-click on the directory node, select New--"catalog"
5, in the Add Directory dialog box, enter the in the entry box asp.net The temporary Files directory. The default should be:
c:\<windir>\microsoft.net\framework\<version number>\temporary asp.net files directory.
<Version number> refers to the. NET version you want to process.
6, in is included in the index? option, select No
7, click OK button
8, right-click on the Indexing Service node, and restart Indexing Service.