When dealing with a customer's problem today, we have stored the third-party tibco that our SharePoint eventhandler depends on. EMS. DLL is registered in GAC, but the log still throws an exception that cannot load the referenced third-party assembly.
Before describing the solution, I will explain the background here. We know that SharePoint provides event handler (user operation event hook) to allow SharePoint users to develop their own business logic. To put it bluntly, when a SharePoint user operates SharePoint data, such as adding a row of data (listitem) to the Sharepoint list, this operation will be monitored by event handler, so that we can write our business logic to the event handler interface provided by Sharepoint. This way, once the addition, deletion, modification, and query events occur, we will call the business logic we write in event handler. In the business logic we write, we can reference a third-party library to meet our business needs; for example, in our own development and testing environment, we call tibco. EMS. the dll library sends messages to the tibco JMS server. This is why we need to use the gacutil command to register tibco. EMS. DLL to GAC.
OK. The basic background is explained. Now let's look at the specific problem. When we use our customized SharePoint event handler to depend on tibco. EMS. DLL is registered in GAC, and then SharePoint
Modify a piece of test data on the website. At this time, the SharePoint event handler event is indeed triggered, but the following exception is thrown,
It catchs the excpetion: cocould not load file or assembly 'tibco. EMS, version = 1.0.700.12, culture = neutral, publickeytoken = 5b83db8ff05c64ba 'or one of its dependencies. the system cannot find the file specified.
Strange: we registered tibco. EMS. DLL to GAC. why can't the background process of w3wp.exe running event handler's iis' load the tibco. EMS. dll library? This problem has plagued me a lot of time.
Later I found an article on the Internet, which described the problem similar to my side in the http://blogs.technet.com/ B /speschka/archive/2013/10/26/another-quot-could-not-load-file-or-assembly-quot-error-resolved.aspx. I tried it and restarted IIS In Sharepoint.
Thank God for solving this problem. Today, it takes an hour to sort out the problem I encountered. I hope you will not be too entangled in this issue. You can try Restarting IIS In Sharepoint, try to see if there is any effect.