473,669 Members | 2,460 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.FileL oadException: 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 2305
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.IsCorrectC ategory(output, NewsCategories) )
{
PageList = ContentPublishi ng.GetAllPageLi st(SiteID,
Com.GetNewsCate goryID(SiteNews Category,NewsCa tegories).ToStr ing(), 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
1788
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 it was something stupid that like that ended up fixing it, but Im just so glad that I can actually get some work done now.
1
7114
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, or one of its dependencies, was not found. I have checked the winnt/assembly directory and the assembly is there. I have two versions of the file - 9.1.5000.0 and 9.1.3300.0. I have tried both with no luck. Is there another assembly that...
1
1270
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 which dependencies are not being found( is there a way to trace the dependencies which are not found). I Just have ftp access to my isp server. Thanks you in advance, Peace,
2
1427
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 that is causing the failure. I have verified that the assembly in question is loadable by a small test EXE. Is there any way that I can debug the process at an earlier stage, or retrieve more helpful error information that simple "The assembly...
6
44482
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 = @"C:\PMDRepository\Tools\ManfBusProcMgr\Modules\TestModule\bin\Debug\TestModule"; Assembly a = Assembly.Load(modulePath); </code>
0
1538
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 could not be found or loaded? File or assembly name Microsoft.VisualStudio.Tools.Applications.Runtime, or one of its dependencies, was not found.
1
3275
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 changed. The only thing I noticed is that it mentions "Using host configuration file: \\?\c:\windows\microsoft.net\framework\v2.0.50727\aspnet.config". Seems pretty strange the "\\?\c:" Oh, of course the file is in the .bin directory...
3
4530
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 don't have access to the GAC, or to install applications, etc... Any ideas? Here's teh error....
6
4888
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 other pc, and running it I get an error. The Dataset loads properly, but when the button is pushed to view the report I get this error: ************** Exception Text **************
4
3299
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: https://www.sdn.sap.com/irj/sdn/businessobjects-downloads ..NET Utility CR 2008 Merge Modules for the .NET Framework ZIP 74.716 Windows English 12.03.2008 and it states:
0
8465
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8383
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8809
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8588
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4206
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2797
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 we have to send another system
2
1788
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.