473,698 Members | 2,149 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"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.FileN otFoundExceptio n: The specified module could not be found.
at CES.VendClientI nt.VendClient.G etCardTypes(... )
at YQ_Epos_server. CodeHandler.sta rt(...)

I have tried copying the appropriate dlls to c:\windows\syst em32 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 2221
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**@discussio ns.microsoft.co m> wrote in message
news:1F******** *************** ***********@mic rosoft.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.FileN otFoundExceptio n: The specified module could not be found.
at CES.VendClientI nt.VendClient.G etCardTypes(... )
at YQ_Epos_server. CodeHandler.sta rt(...)

I have tried copying the appropriate dlls to c:\windows\syst em32 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.GetCurr entProcess();
Directory.SetCu rrentDirectory
(pc.MainModule. FileName.Substr ing(0,pc.MainMo dule.FileName.L astIndexOf(@"\" )
));
....

José

"dice" <di**@discussio ns.microsoft.co m> wrote in message
news:1F******** *************** ***********@mic rosoft.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.FileN otFoundExceptio n: The specified module could not be found.
at CES.VendClientI nt.VendClient.G etCardTypes(... )
at YQ_Epos_server. CodeHandler.sta rt(...)

I have tried copying the appropriate dlls to c:\windows\syst em32 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
2208
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 python-help, to point out a few resources that can help with answering your own questions, or improve the chances of getting a useful answer from the helpers. The most comprehensive overview of python.org help resources is at ...
86
3912
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 not be smaller than short and long may not be smaller than int. They go on to say, Many implementations represent characters in 8 bits, type short in
0
1572
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 project, I get the following error: "The specified domain either does not exist or could not be contacted" The LDAP path I'm using is shown below and I know that it works: "LDAP://CN=BuchanKL,OU=WebDevelopment,DC=troutmansanders,DC=com" I...
3
1371
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 run by double clicking on the project's EXE file. The problem can be replicated easily: Create a new project in Visual Studio 2003 and add the following code. Module Main Sub Main()
10
21814
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 holding the mouse over it I see a message saying: "The breakpoint will not currently be hit. The specified module has not been loaded". I have no problem when debugging a normal full framework application. I have not changed anything in my settings...
0
2520
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: RAISERROR (14113, 16, -1, @osql_cmd, 'instdist.out') The details... MSDE2 SP3 Win 2003 STANDARD edition
3
5851
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 section describes a solution using methods returning references to static objects. But consider:
3
5916
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 rename the form, report, or module to 'Utilities' ... Close the database, reopen it, and try the rename operation again." This didn't work. It seemed that other modules could still be renamed normally, but this one - "Utilities" - could not. I could...
1
5879
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 problem occurs when trying to connect to a remote pc. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try
2
4717
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 which Inherits MarshalByRefObject (ok, at this stage it only contains one class... but its gonna grow) - Class Library containing common classes and interfaces that will be shared between all projects. This include interfaces for the server...
0
8674
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
9157
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9028
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
8895
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
7728
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
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();...
1
3046
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
3
2001
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.