473,511 Members | 14,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error: could not load file or assembly or one of its dependencies

Hi,

Does anybody encounter this error:
Unhandled Exception: System.IO.FileLoadException: could not load file or
assembly or one of its dependencies. Access is denied.

I google the error and found a few resolutions, such as exclude Temporary
ASP.NET Files folder from virus scan, grant full rights to Temporary ASP.NET
Files folder, etc. all doesn't work.

Previously the application works fine if all dlls are deployed in GAC, but
after I move dll to application Bin folder, the problem happens. To make the
website up, I have to clear all content in Temporary ASP.NET Files folder,
but after a few runs, it happenes again. Right now the only soultion works
for me is to set trust level to full in web.config, which I don't want to do
due to security reason.

Does anybody know what could be the cause? thanks in advance.

Jan 3 '08 #1
2 2261
Hello Sheila,

How do u refer to your dll? could you post the code how u declare and use
your dll?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
SPreviously the application works fine if all dlls are deployed in
SGAC, but after I move dll to application Bin folder, the problem
Shappens. To make the website up, I have to clear all content in
STemporary ASP.NET Files folder, but after a few runs, it happenes
Sagain. Right now the only soultion works for me is to set trust level
Sto full in web.config, which I don't want to do due to security
Sreason.
S>
Jan 3 '08 #2
Hi Michael,

The website is hosting a few customized server controls, thus its difficult
to post all code here. I just show you how a assembly (common library) is
normally called in the code

....
using Company.Common;

....
CommonFunction Com = new CommonFunction();
if (Com.IsCorrectCategory(output, NewsCategories))
{
PageList = ContentPublishing.GetAllPageList(SiteID,
Com.GetNewsCategoryID(SiteNewsCategory,NewsCategor ies).ToString(), null,
_startDateTime, _endDateTime);
}
...

Is there any article I can read on this? thanks.

Regards
Yu Ping

"Michael Nemtsev [MVP]" wrote:
Hello Sheila,

How do u refer to your dll? could you post the code how u declare and use
your dll?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
SPreviously the application works fine if all dlls are deployed in
SGAC, but after I move dll to application Bin folder, the problem
Shappens. To make the website up, I have to clear all content in
STemporary ASP.NET Files folder, but after a few runs, it happenes
Sagain. Right now the only soultion works for me is to set trust level
Sto full in web.config, which I don't want to do due to security
Sreason.
S>
Jan 4 '08 #3

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

Similar topics

0
1780
by: CHRIS | last post by:
Isn't it always the case that as soon as you post, you solve the problem? Apparently, adding an extra "space" to a blank line in my web.config file solved this problem. I would be angry that...
1
7105
by: Scott Hamlin | last post by:
I am receiving an error while trying to use Crystal Reports with .NET, which I have pasted below. The main problem is this message: File or assembly name CrystalDecisions.CrystalReports.Engine,...
1
1265
by: news | last post by:
Hi, I have just deployed my private assembly in the bin directory of my ISP and I am getting the following error. I am pretty sure it is able to find my assemblyPLEASE tell me how can I find...
2
1418
by: Ben Harper | last post by:
I'm trying to load an assembly of mine from a C# webforms page, but IIS fails to load the page because of failed dependencies. My problem is that I cannot for the life of me discover the dependency...
6
44471
by: Steve | last post by:
I'm playing with late binding and trying a very simple test to load an assembly In my "Host" application I have this code: <code> string modulePath =...
0
1516
by: jason_cuteboy | last post by:
Hi all, Completely new to Vb.net and trying to create a simple VB Office Excel application/spreadsheet. When I built the project, and excel opens up an error comes up.... Customization assembly...
1
3245
by: Carlos Sosa Albert | last post by:
Hello people, I'm having an issue registering an assembly in ONE server. I've already tried to reinstall the .NET framework 2.0 but the error is still there. I enabled the logging but nothing...
3
4518
by: Cirene | last post by:
I created a 3.5 ASP.NET website using Teleriks Rad Controls. It works fine locally, but when I deploy it to the server I get a "Configuration Error". I am "renting" space on the server so I...
6
4871
by: Miro | last post by:
I can run an exe ( and its install ) i have created on my machine. The exe has a button that populates a dataset and then shoots it to a crystal report. But... Installing the setup.exe on my...
4
3280
by: Miro | last post by:
<i have also added this reply to the other newsgroup - now that I have realizd ( and assuming ) it is not a localized error directly to vb.> I have found this link on the website:...
0
7417
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7506
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...
0
5659
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3219
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
445
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.