James Thorpe
James Thorpe

Reputation: 32202

Intermittent Assembly Loading Error

We have a web application that utilises plugins. This system is used in many successfully deployed installations, but in one instance we are seeing an intermittent issue. Occasionally it will fail to load a user created plugin - see fusion log below. When it fails, the users switch servers to their redundant server and carry on, until the problem then manifests itself on the redundant server (no specific time between failures - could be hours up to weeks), and then switch back to the original server again (where again it will be fine). We've been supplied the source of the plugin and confirmed it's not an issue with the code/dll itself.

*** Assembly Binder Log Entry  (2013-06-18 @ 00:32:49) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:  C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
Running under executable  c:\windows\system32\inetsrv\w3wp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: User = ***\***
LOG: Where-ref bind. Location = D:\Program Files\***\***\***\plugins\***.dll
LOG: Appbase = file:///D:/Program Files/***/***/***/plugins/
LOG: Initial PrivatePath = D:\Program Files\***\***\***\plugins\references\
LOG: Dynamic Base = NULL
LOG: Cache Base = D:\Program Files\***\***\***\plugins\cache\79797f4b-d645-4a33-ad9d-c75f1c548e15
LOG: AppName = ***
Calling assembly : (Unknown).
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: Using application configuration file: D:\Program Files\***\***\webfiles\web.config
LOG: Using host configuration file: \\?\C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet.config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Attempting download of new URL file:///D:/Program Files/***/***/***/plugins/***.dll.
LOG: Assembly download was successful. Attempting setup of file: D:\Program Files\***\***\***\plugins\***.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: ***, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
LOG: Re-apply policy for where-ref bind.
LOG: Where-ref bind Codebase matches what is found in default context. Keep the result in default context.
LOG: The post-policy assembly reference requires probing again.
LOG: Switch from LoadFrom context to default context.
LOG: Using application configuration file: D:\Program Files\***\***\webfiles\web.config
LOG: Using host configuration file: \\?\C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet.config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///D:/Program Files/***/***/***/plugins/***.DLL.
LOG: Assembly download was successful. Attempting setup of file: D:\Program Files\***\***\***\plugins\***.dll
LOG: Entering download cache setup phase.
ERR: Setup failed with hr = 0x80070002.
ERR: Failed to complete setup of assembly (hr = 0x80070002). Probing terminated.

Any thoughts on what could be causing it to fail in this way intermittently?

Upvotes: 1

Views: 314

Answers (1)

Gangadhar Heralgi
Gangadhar Heralgi

Reputation: 219

What is the signature of the assembly when it is loaded? You can find it by attachingvto debugger and viwing the modules loaded. is it different is the string name when load fails?

also use fuslogview.exe as tool and keep logging all module load failures, when load fails, the fuslogview details will provide you enogh details as why the assembly load failed.

Upvotes: 1

Related Questions