Solved

Could not load file or assembly .... or one of its dependencies

Posted on 2007-03-28
7
1,173 Views
Last Modified: 2013-12-17
Hello People.

I have a problem with an ASP page referencing a ,net DLL.

Basically, the DLL that i have created, references another DLL, which is already registered on the server, so when i try to run the new dll i get the following:

Could not load file or assembly 'PrintLibrary, Version=1.0.1944.19210, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

However, i dont know how to go about fixing it.  I THINK this is why i am getting the above problem, correct me if i am wrong.

Any suggestions? No links please, i have looked around already

Apresto
0
Comment
Question by:apresto
  • 4
  • 3
7 Comments
 
LVL 12

Expert Comment

by:ShazbotOK
ID: 18808706
I gather you have already tried a unregister / re-register of the PrintLibrary DLL to be sure that it is properly set within the Registry?  The error indicates that the server's registry is pointing to a location of the DLL where it does not exist.

Also if the PrintLibrary DLL is a .NET Assembly - in order to be able to call it from ASP it will have to be registered by the regasm.exe  
0
 
LVL 23

Author Comment

by:apresto
ID: 18809838
the confusing thing though it that it works fine from a VBS script but i get the above error from ASP? strange?
0
 
LVL 23

Author Comment

by:apresto
ID: 18810043
In all there are about 7 different DLL's, i reference the PrintLibrary.Dll, and that in turn must reference a number of others - is it necessary to register each dll individually?  Im just confused as to why it works with a vbs script and not and asp page - virtually the same thing
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 12

Accepted Solution

by:
ShazbotOK earned 500 total points
ID: 18810074
Difference would be that ASP uses the IUSR account for access - possibly could be a permissions problem?

Good and easy way to rule this out is to try using your NT Authority account in place of IUSR (Only temp setting)
0
 
LVL 23

Author Comment

by:apresto
ID: 18814721
>>Good and easy way to rule this out is to try using your NT Authority account in place of IUSR (Only temp setting)

how would i do this?
0
 
LVL 23

Author Comment

by:apresto
ID: 18814769
It was infact the permissions on the imae directory that i was writting to - your a saint!!! :o)

one more question, quick one

In the dll i am calling an application (an external exe) - if 2 people happen to visit the same page at the sam ime and this app is called at the same time will it error it will it alow multiple intances to be executed? long shot, thought you might know
0
 
LVL 12

Expert Comment

by:ShazbotOK
ID: 18815218
Yes - ASP.NET is multi-threaded so the exe would be run for each instance and if data returned will only return to the thread that kicked it off.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now