access denied: NHibernate

G

Guest

I took over an asp.net C# app from a former developer that left. Ever so
ofter I get an error message:
Access is denied: 'NHibernate'.
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:
'NHibernate'.



so my question is, why am I getting this error and can someone tell me what
exactly is NHibernate.DLL and I need to use it? This is the first asp.net web
app I worked on that uses it
 
S

Steve C. Orr [MVP, MCSD]

Well it sounds like the NHibertnate library does not have the permissions it
needs to do something.
http://www.hibernate.org/343.html

I don't know much about that library, but you might try using impersonation
to give it an alternate permission set.
For example, you can add a line similar to this to your web.config file:
<identity impersonate="true" userName="domain\MyAppUser"
password="password"/>

For testing purposes you can have it use your user account since you know
you have the necessary permissions to write to that network location.

Here's more info on impersonation:
http://msdn.microsoft.com/library/d...-us/cpguide/html/cpconaspnetimpersonation.asp
 
G

Guest

thanks I'll look at the below links. Though I don't think its a permission
issue due to it doesn't happen every day and even though a user gets the
error on one page they can close out that page and go to another page within
the web app without any issues. If it happened for every user on every page
and all the time it might be easier to figure out, but since it only happened
twice on 2 seperate web pages and the user can close that page and go to
another page fine, makes it a little puzzling.
 
S

Steven Cheng[MSFT]

Thanks for Steve's input.

Hi Mike,

NHibernate is a data accessing component (ported from the Hibernate
component in java). It concentrate on O-R mapping data accessing. I think
the former developer of your current project must have used it for
accessing database.

Also, it seems that the application doesn't have sufficient permission to
load the NHibernate assembly. In addition to the checking security identity
approach Steve has mentioned, you can also use the NT Filemon utility to
trace the file accessing on the machine to see whether it is a NTFS
permission issue.

#FileMon for Windows v7.04
http://www.microsoft.com/technet/sysinternals/FileAndDisk/Filemon.mspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Guest

thanks Steve, though running filemon on it i don't think will help due to the
error isn't all the time. Its random and it can happen on any web page. So
far its only happened twice. I'm just trying to figure out what the file was
and what it did and see if I could possiblly remove it from the conversion of
..NET 1.1 to .NET 2.0 and not affect anything in the process.
 
S

Steven Cheng[MSFT]

Hello Mike,

Thanks for your followup.
I think it will be a bit harder if the problem become randomly occuring.
Anyway, please feel free to post here if there is anything we can help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top