473,395 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

access denied: NHibernate

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
Nov 20 '06 #1
5 3090
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/de...ersonation.asp

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

"igotyourdotnet" <ig************@nospam.nospamwrote in message
news:E8**********************************@microsof t.com...
>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

Nov 20 '06 #2
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.
"Steve C. Orr [MVP, MCSD]" wrote:
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/de...ersonation.asp

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

"igotyourdotnet" <ig************@nospam.nospamwrote in message
news:E8**********************************@microsof t.com...
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


Nov 20 '06 #3
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/sys...k/Filemon.mspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

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

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.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/subscripti...t/default.aspx.

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

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

Nov 21 '06 #4
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.
"Steven Cheng[MSFT]" wrote:
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/sys...k/Filemon.mspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

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

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.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/subscripti...t/default.aspx.

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

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

Nov 22 '06 #5
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.

Nov 23 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the...
5
by: JP Green | last post by:
Hi guys, Just came back to ASP.NET after a couple year hiatus and I have a feeling that time has passed me by on some of this stuff re: application design. My biggest gripe as a programmer is...
0
by: Aquila Deus | last post by:
The documents on their website are completely wrong. Following is the a real example that works with NHibernate 1.0.2.0: <?xml version="1.0" encoding="utf-8"?> <configuration...
1
by: erin.sebastian | last post by:
Hello All, I am new to hibernate and new to nHibernate. I created a small app and when i try and run it i get the error i posted at the bottom of this message. I am using the helper class that...
0
by: beantaxi | last post by:
Hello all, I'm trying to write a simple program, using VS C# 2005 Express and SQL Server Express with NHib 1.0.2. No matter what I try, I'm unable to connect: cannot open connection at...
0
by: Pieter | last post by:
Hi, I'm using NHibernate 1.2 (CR1), and I'm using a custom list (inherited from BindingList(Of T) ) for all my lists. The NHibernate documentation told me that I had to implement...
4
by: IceMan | last post by:
Hi, I am using the configuration object and passing it a Assembly object to load. The assembly object i pass in is from a dll which is in a different folder then the Nhibernate dll. The...
14
by: thj | last post by:
Hi, I was wondering what you guys are using and why? LINQ to SQL or NHibernate? Thanks in advance, Tommy
1
by: moorcroft | last post by:
Hi I'm looking for help with getting the latest NHibernate to work with my .Net 3.5 VS 2008 project that I am migrating from .Net 2.0 on VS 2005. Previously (VS 2005 .Net 2.0) I would use the folling...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.