This problem occurs when I upload my project to the server. I have finally solved the problem by searching for the best medicine and working out the following methods:
1. The main reason is: the referenced project. the. net version is different from the framework started in windows xp. My PC is-> right-click Management-> Internet Information Service-> default website-> right-click Properties-> ASP. NET-> change the corresponding asp.net version to windows 7 my computer-> right-click Management-> Internet Information Service (IIS) manager-> double-click Open-> click application pool-> double-click the website to be modified-> Save. you can change the NET Framework version to the corresponding version. 2. If the iis program pool net framwork version is inconsistent with the net framwork version of your project when you debug the wcf Service, modify the iis program pool configuration, debug OK. 3. "failed to Load file or assembly or one of its dependencies, Access Denied" appears during the adjustment"
Method 1: Stop the Indexing service
Method 2: configure the temporary directory of ASP.net not affected by the Indexing service.
Method 3: delete the pdb file in the bin directory
Method 4: Modify the windows/temp directory permission and set asp.net Machine Account to fully control the directory.
But none of them can solve the problem.
This is because asp.net does not have the read/write permission on the Temporary Folder. For C:/WINDOWS/Microsoft. NET/Framework/v2.0.50727/Temporary ASP.. NET Files directory authorization can completely solve the problem, so far there has been no problem, but the premise is that the file does exist, no file is missing.
4. Delete and reload the dll file, and make sure that the dll file has been referenced in the bin folder;
5. Grant the read and write permissions to C: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ Temporary ASP. NET Files.
I sorted out the above methods for reference only. After some tossing, I found my Web. the version in config is incorrect because my local compiling software uses the latest version 4.0 compiled by VS2010 and my server space is V3.5, so I used the method in Step 4 to delete the original dll file. After uploading the latest dll file, I can run it.