all groups > dotnet clr > february 2007 >
You're in the

dotnet clr

group:

intermittent could not load file or assembly



intermittent could not load file or assembly kblau
2/8/2007 9:17:00 PM
dotnet clr: The full error is 'could not load file or assembly
'Microsoft.ReportViewer.WinForms, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f... or one of its dependencies. Failed to grant minimum
permission requests. (Exception from HRESULT:0X80131417)

This error is itermittent, not related to a specific user and comes and goes
when the Microsoft report service viewer code is run in a .NET C# Windows
application.

User logs onto a terminal server session (Remote Desktop Connection), this
is the way they do it, and then clicks on a batch file that starts the
MyApp.exe that sits on a shared network drive on server 'B'. So to recap,
the user is executing the application that is on a shared network drive. All
the app dll's are on this shared drive. The error occurs when the user runs
the Microsoft report services viewer code (microsoft.ReportViewer.WinForms),
while other Dlls on server 'B' ,same directory, do not have this intermitent
problem.

I checked the code access security and it is set correctly. Everything is
reset to defaults plus a machine policy exists that allows FullTrust to the
URL (server 'B') 'file://serverB/sharedDrive'. If I testingly take away
this policy the MyApp.exe will not even start, so I know CasPol is ok.
Effectivly the Intranet Zone allows full trust to the shared drive running
myApp.

To make matters more complex:
The code does some Identity impersonation, changing windows identity to have
access to do I/O on a particular network drive.

But, with CAS and ACL(user security) not changing, the
Microsoft.ReportViewer.WinForms assembly should consistenly run correctly or
error out, not itermitently do either one.

Could this bug be related to the terminal server sessions using a shared
network drive. Testing with different terminal server user id's shows that
(possibly coincidentally) the problem happens mostly with the second usage of
a new user id.

How can I get the bottom of this?

--
Ken Blau
ken.blau@cox.net
Developer
RE: intermittent could not load file or assembly Ciaran O''Donnell
2/15/2007 7:02:57 AM
I think I remember having an issue like this before due to the fact that a
machine can only access a server share with one set of credentials at a time.
Therefore, impersonating different users to accesss the share, they either
wont be able to validate or will change the in use credentials, causing the
existing connection to stop working.

It a vague recollection from a few years ago with WinNT4/200 but might be
worth looking into.

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com


[quoted text, click to view]
AddThis Social Bookmark Button