473,396 Members | 2,011 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,396 software developers and data experts.

"The specified module could not be found" problem

I have built a .NET based service that uses a number of related 3rd party dlls.

If I compile my code into a dll and use this in a test app all is well -
however if I compile my code as a service and try to run the service I get
the following exception:
System.IO.FileNotFoundException: The specified module could not be found.
at CES.VendClientInt.VendClient.GetCardTypes(...)
at YQ_Epos_server.CodeHandler.start(...)

I have tried copying the appropriate dlls to c:\windows\system32 and to the
application directory but to no avail. How can I go about resolving this
issue - bear in mind I am relatively new to .NET development.
Jul 21 '05 #1
3 2188
You will need to install the required DLL's in the Global Assembly
Cache(GAC), use gacutil -i <dllname> to install the assembly in the GAC from
where your service app will be able to access it.
--
Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
"dice" <di**@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...
I have built a .NET based service that uses a number of related 3rd party dlls.
If I compile my code into a dll and use this in a test app all is well -
however if I compile my code as a service and try to run the service I get
the following exception:
System.IO.FileNotFoundException: The specified module could not be found.
at CES.VendClientInt.VendClient.GetCardTypes(...)
at YQ_Epos_server.CodeHandler.start(...)

I have tried copying the appropriate dlls to c:\windows\system32 and to the application directory but to no avail. How can I go about resolving this
issue - bear in mind I am relatively new to .NET development.

Jul 21 '05 #2
The documentation seems to indicate that this should not be used other than
for development purposes, I would like to get this running from the install
scripts.

Also when I do try to run this I get:
"Failure adding assembly to the cache: An attempt was made to load a
program with an incorrect format"
for the ActiveX dll (this has been registered previously using regssrv32.exe)
or
"Failure adding assembly to the cache: Attempt to install an assembly
without a strong name"
for the .NET wrapper dll and the .NET assembly dll.
Jul 21 '05 #3
By the way, you can redefine the working directory for a Service.
Personnaly, in the OnStart method, I redefine it so as to be the directory
where the Main exe file is located:

protected override void OnStart(string[] args)
{
try
{
// Define working directory (For a service, this is set to System)
Process pc = Process.GetCurrentProcess();
Directory.SetCurrentDirectory
(pc.MainModule.FileName.Substring(0,pc.MainModule. FileName.LastIndexOf(@"\")
));
....

José

"dice" <di**@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...
I have built a .NET based service that uses a number of related 3rd party dlls.
If I compile my code into a dll and use this in a test app all is well -
however if I compile my code as a service and try to run the service I get
the following exception:
System.IO.FileNotFoundException: The specified module could not be found.
at CES.VendClientInt.VendClient.GetCardTypes(...)
at YQ_Epos_server.CodeHandler.start(...)

I have tried copying the appropriate dlls to c:\windows\system32 and to the application directory but to no avail. How can I go about resolving this
issue - bear in mind I am relatively new to .NET development.

Jul 21 '05 #4

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

Similar topics

0
by: python-help-bounces | last post by:
Your message for python-help@python.org, the Python programming language assistance line, has been received and is being delivered. This automated response is sent to those of you new to...
86
by: Randy Yates | last post by:
In Harbison and Steele's text (fourth edition, p.111) it is stated, The C language does not specify the range of integers that the integral types will represent, except ot say that type int may...
0
by: Kevin Buchan | last post by:
I have some code to query Active Directory group membership, based on an LDAP path. This works beautifully in my test exectuable, but when I try to move the class I built into an ASP.Net web...
3
by: Ralph Purtcher-Wydenbruck | last post by:
This is a worrying bug, and indicates a potential problem in the Framework CLR. This bug affected a project I was working on, which behaved differently when run from the Visual Studio IDE than when...
10
by: Ole | last post by:
Hi, Using VS2005 and a windows CE 5.0 device running CF2. Suddenly I can't debug my C# program from VS2005 - when setting a breakpoint I only see a ring instead of the normal red dot and when...
0
by: drewmania001 | last post by:
When trying to setup relplication for SQL i am getting the following error. "The system cannot find the path specified" The problem is when trying to run: sp_adddistributiondb line 434:...
3
by: Steve Folly | last post by:
Hi, I had a problem in my code recently which turned out to be the 'the "static initialization order fiasco"' problem (<http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.12>) The FAQ...
3
by: Mac Campbell | last post by:
For some unknown reason my mdb seemed to drop a module I had named "Utilities". I tried to copy the module back in from a backup copy and got the error message "<<MyProject>> is currently unable to...
1
by: William Cruz | last post by:
Can anyone help me with this piece of code. - I keep on getting the error message "The object exporter specified was not found" If i change it to run on my local machine it works fine, the...
2
by: Wimpie van Lingen | last post by:
Hey I have some more questions with regards to Remoting in .NET 2. I'm using TCP with the Binary formatter. My solution consists of 4 projects: - Class Library containing the server classes...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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...
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
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...
0
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
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,...

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.