Assembly failing to load intermittently... help!

dannyc

Perch
I have a .Net application that has been running fine until this past week. I am using the Blowery HttpCompress module (recompiled using ICSharpCode.SharpZipLib 0.6), and this is the error message I get:

Code:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.IO.FileLoadException: Access is denied: 'ICSharpCode.SharpZipLib'.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Assembly Load Trace: The following information can be helpful to determine why the assembly 'ICSharpCode.SharpZipLib' could not be loaded.


=== Pre-bind state information ===
LOG: DisplayName = ICSharpCode.SharpZipLib, Version=0.6.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73
 (Fully-specified)
LOG: Appbase = file:///D:/hshome/(myUserNameHere)/sage.craigg.net
LOG: Initial PrivatePath = bin
Calling assembly : blowery.Web.HttpCompress, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null.
===

LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/root/02497ca3/721301cc/ICSharpCode.SharpZipLib.DLL.
LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/root/02497ca3/721301cc/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.DLL.
LOG: Attempting download of new URL file:///D:/hshome/(myUserNameHere)/sage.craigg.net/bin/ICSharpCode.SharpZipLib.DLL.

 

Stack Trace: 


[FileLoadException: Access is denied: 'ICSharpCode.SharpZipLib'.]
   blowery.Web.HttpCompress.GZipFilter..ctor(Stream baseStream) +0
   blowery.Web.HttpCompress.HttpModule.GetFilterForScheme(String[] schemes, Stream output, Settings prefs) +736
   blowery.Web.HttpCompress.HttpModule.CompressContent(Object sender, EventArgs e) +471
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87

ICSharpCode.SharpZipLib.DLL is in my bin folder. If I refresh the date/time of the ICSharpCode.SharpZipLib.DLL file by pulling the file down with FTP and then putting it right back, the application works fine... for a while (seems to always be down in the morning until I do this). Anyone know what the error above is trying to tell me? Similar errors I've seen in the past at least tell me "Hey, dummy, wrong version of the assembly", but I'm not getting a lot of information from this one.
 
I just got the same problem with the same ZIP library.
Any solutions?

Error message I got:
Access is denied: 'ICSharpCode.SharpZipLib'

What have you done danyc?
Thank you!
 
I think I may have found the solution.
There was a KB from microsoft telling this is caused by having a strong named assembly. The suggested solution by MS was to put the assembly in GAC. Since I don't have access to GAC I just recompiled the SharZipLib without the strong name and I don't see the error anymore.
 
I see similar errors with corrupt files in DNN, but that doesn't look to be the issue on your error.
 
IT seems to me that this is a file system problem, that is all i can gather, all of a sudden, coincidentally along with the patches applied to hsphere last night, i began having problems writing to ftp, specifically creating folders, in both local ftp clients, and WebShell on Win5. I get a "write/access error on D:\" in asp.net scripts/programs such as DNN, in particular when creating a new portal or installing a new module.

In dreamweaver, i kept getting an error "the remote connection has been closed" and a "cannot retrieve server time" from a site connection that had previously worked. I changed the startupfolder from the normal SITENAME.com/ to ACCOUNTNAME/SITENAME.com/ and this seemed to work. Why all of a sudden this happens is beyond me.

Created a ticket but i figured i'd look on the forum for similar problems, this seems to be it.
 
My trouble ticket was answered and this resolved the FTP issues, but in DNN, it still has the same problem when creating a new or even the default profile. I've been trying to reinstall DNN all night, and still the same error. not sure why, since it was working when i installed it a couple of days ago. It seems to get problems when doing anything along the lines of manipulating the file system, or working with zip files.

the general error is: 00:00:17.343 - Error: Could not find a part of the path "D:\".
00:00:17.343 - Portal failed to install:
00:00:17.343 - Installing Optional Resources:
00:00:17.359 - Installing Skin File D:\hshome\*****\******\Install\Skin\ClearBusiness.zip:

where the first **** is my account name, and the second is the site root. that is where it halts.

anyone got any ideas?

this is the latest error message
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
System.Collections.ArrayList.get_Item(Int32 index) +91
DotNetNuke.Entities.Portals.PortalSettings.VerifyPortalTab(Int32 PortalId, Int32 TabId) +351
DotNetNuke.Entities.Portals.PortalSettings.GetPortalSettings(Int32 TabId, PortalAliasInfo objPortalAliasInfo) +2850
DotNetNuke.Common.Globals.GetHostPortalSettings() +240
DotNetNuke.Common.Globals.GetPortalSettings() +67
DotNetNuke.Modules.Admin.ResourceInstaller.ResourceInstallerBase..ctor() +8
DotNetNuke.Modules.Admin.ResourceInstaller.PaInstaller..ctor(String Path, String SitePath) +14
DotNetNuke.Modules.Admin.ResourceInstaller.ResourceInstaller.Install(Boolean status, Int32 indent) +498
DotNetNuke.Services.Upgrade.Upgrade.InstallDNN(String strProviderPath) +1554
DotNetNuke.Framework.Install.InstallApplication() +1003
DotNetNuke.Framework.Install.Page_Load(Object sender, EventArgs e) +220
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750

i've been checking DotNetNuke's forums but this problems seems it should have been fixed for 3.00.13 (the version i'm working with)
 
My problem was resolved by removing the strong name from the assembly. I don't think those problem are related but I wish you good luck! :)
 
This behaviour is by design. Check this out
http://support.microsoft.com/default.aspx?scid=kb;en-us;813833

Your immediate way out of the problem is either:
> If you have physical access to the server then Register the assembly in the GAC using GACUTIL.EXE or copy the file into %win32root%\assembly using Windows explorer.

Or
If you only have remote access such as ftp which is what hosting with an ISP would provide you then you have no choice but to Remove the strong naming from the assembly

Hope that helps

Cheers,

Adam
 
Back
Top