-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: System.IO.FileLoadException: Access is denied: 'log4net'
PostPosted: Fri Dec 16, 2005 11:29 am 
Newbie

Joined: Fri Dec 16, 2005 11:21 am
Posts: 7
Hallo people,
I think this is not a complicated probelm at all.
I'm using NHibernate in an ASP.NET application.
I downloaded the last version(1.0.1) of NHibernate.
I added the NHibernate-1.1 project to my solution (I didn't add, for now, the other projects).
When I first create my instance of configuration I get th following exception.
What is my problem?
I tried to redownload NHibernate, but it didn't work. Please help me!
Many thanks in advance.


Best regards



Giorgio








System.IO.FileLoadException: Access is denied: 'log4net'


Server Error in '/Sicurezza' Application.
--------------------------------------------------------------------------------

Access is denied: 'log4net'.
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: 'log4net'.

Source Error:


Line 21: get{
Line 22: if(_instance==null){
Line 23: Configuration cfg = new Configuration();
Line 24: System.Reflection.AssemblyName[] an = System.Reflection.Assembly.GetCallingAssembly().GetReferencedAssemblies();
Line 25: for(int i=0;i<an.Length;i++)


Source File: C:\Programmi\Microsoft Visual Studio .NET 2003\WORKSPACE\Sogei\NHibernate\SoGeI.NHibernate\SessionFactory.cs Line: 23

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


=== Pre-bind state information ===
LOG: DisplayName = log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905
(Fully-specified)
LOG: Appbase = file:///c:/inetpub/wwwroot/Sicurezza
LOG: Initial PrivatePath = bin
Calling assembly : NHibernate, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null.
===

LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/sicurezza/4f5ad826/145e7f07/log4net.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/sicurezza/4f5ad826/145e7f07/log4net/log4net.DLL.
LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/Sicurezza/bin/log4net.DLL.



Stack Trace:


[FileLoadException: Access is denied: 'log4net'.]
NHibernate.Cfg.Configuration..cctor() +0

[TypeInitializationException: The type initializer for "NHibernate.Cfg.Configuration" threw an exception.]
NHibernate.Cfg.Configuration..ctor() +0
SoGeI.NHibernate.SessionFactory.get_Instance() in C:\Programmi\Microsoft Visual Studio .NET 2003\WORKSPACE\Sogei\NHibernate\SoGeI.NHibernate\SessionFactory.cs:23
Sicurezza.Classi.Brokers.CModelloAttivitaBroker.get_Modelli() in C:\PROGRAMMI\MICROSOFT VISUAL STUDIO .NET 2003\WORKSPACE\BSt\Brokers\CModelloAttivitaBroker.cs:58
Sicurezza.Classi.Brokers.CModelloAttivitaBroker.GetListaCompletaModelliAttivita() in C:\PROGRAMMI\MICROSOFT VISUAL STUDIO .NET 2003\WORKSPACE\BSt\Brokers\CModelloAttivitaBroker.cs:32
Sicurezza.Controllers.GestioneAttivitaController.GetListaCompletaModelliAttivita() in c:\inetpub\wwwroot\Sicurezza\GestioneAttivitaController.cs:20
Sicurezza.GestioneAttivita.CaricamentoAttivitaInTabella() in c:\inetpub\wwwroot\Sicurezza\GestioneAttivita.aspx.cs:76
Sicurezza.GestioneAttivita.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Sicurezza\GestioneAttivita.aspx.cs:97
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e)
Sicurezza.UIProcess.SicurezzaPage.OnLoad(EventArgs e) in c:\inetpub\wwwroot\Sicurezza\UIProcess\SicurezzaPage.cs:9
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032


Top
 Profile  
 
 Post subject: New Information
PostPosted: Fri Dec 16, 2005 12:25 pm 
Newbie

Joined: Fri Dec 16, 2005 11:21 am
Posts: 7
I downloaded log4net project, but I have the same problem for Iesi.Collections...


Top
 Profile  
 
 Post subject: Re: New Information
PostPosted: Sat Dec 17, 2005 7:27 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
Iesi.Collections.dll should be in your bin directory... (NHibernate is shipped with it)

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
 Post subject: No way...
PostPosted: Sat Dec 17, 2005 9:54 am 
Newbie

Joined: Fri Dec 16, 2005 11:21 am
Posts: 7
I have Iesi.Collections.dll, like I had log4net.dll, but... I get that exception in any case... I was thinking that maybe I should directly use the dlls and not the projects... I can't try now, can this be the solution for my problem?


Top
 Profile  
 
 Post subject: Re: No way...
PostPosted: Mon Dec 19, 2005 11:18 am 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
giorgio wrote:
.... maybe I should directly use the dlls and not the projects... I can't try now, can this be the solution for my problem?


IMHO, definitely.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 19, 2005 1:20 pm 
Newbie

Joined: Fri Dec 16, 2005 11:21 am
Posts: 7
It works at last... thanks a lot...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.