FileNotFoundException

R

Roger R. Smith

I need some help.
I generated an enum using EnumBuilder and created an assembly called
EnumAssembly.dll into the bin directory of my web service. I not creating
this enum while running the web service, I created it before I called the
web service.
I then use this enum from the web service as a input to to [webmethod].
I am getting the error FileNotFoundException: File or assembly name
<random.dll>, or one of its dependencies, was not found.

However if I create an enum in Visual Studio and manually put in the enum
values and place this dll into my web service bin dir and then use this data
type as my input, things work fine.

I am not creating the enum at runtime in the web service, I create it
beforehand and import it into my web service, but when I try to invoke any
operation on my web service I get that error.
I am using C#.

Any ideas?
Thank you very much.
 
D

Dan Rogers

Hi Roger

This sounds like your VS.NET project is missing a reference to this
specific DLL. Be sure you add a specific reference (add-reference) from
your project to this DLL. If the code compiles, but on your production
machine it still cannot find this reference, you may be using assemblies
that are differently versioned (e.g. different strong names). Be sure to
copy the same versions from your development environment to your production
environment. One way to test if this is the case is to "file-publish" the
web service that is working on your development machine to a test machine.
If the code works there, you probably are using different versions of the
specific random.dll.

Dan Rogers
Microsoft Corporation
--------------------
 
R

Roger R. Smith

Thank you Dan for the reply. I really appreciate it.
I found out what happened by using http://www.sellsbrothers.com.
Anyway what happened was the xml file I was using to generate the Enum had
duplicate entries. So for instance I had two 'state' in my enum. It did
generate but when I went to use the enum there were issues serializing. So
I fixed this and it is working great now.
Thank you very much for your quick response.
Rog
Dan Rogers said:
Hi Roger

This sounds like your VS.NET project is missing a reference to this
specific DLL. Be sure you add a specific reference (add-reference) from
your project to this DLL. If the code compiles, but on your production
machine it still cannot find this reference, you may be using assemblies
that are differently versioned (e.g. different strong names). Be sure to
copy the same versions from your development environment to your production
environment. One way to test if this is the case is to "file-publish" the
web service that is working on your development machine to a test machine.
If the code works there, you probably are using different versions of the
specific random.dll.

Dan Rogers
Microsoft Corporation
--------------------
From: "Roger R. Smith" <[email protected]>
Subject: FileNotFoundException
Date: Tue, 23 Nov 2004 19:54:31 -0500
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
NNTP-Posting-Host: 216.64.116.50
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12
phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:26794
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices

I need some help.
I generated an enum using EnumBuilder and created an assembly called
EnumAssembly.dll into the bin directory of my web service. I not creating
this enum while running the web service, I created it before I called the
web service.
I then use this enum from the web service as a input to to [webmethod].
I am getting the error FileNotFoundException: File or assembly name
<random.dll>, or one of its dependencies, was not found.

However if I create an enum in Visual Studio and manually put in the enum
values and place this dll into my web service bin dir and then use this data
type as my input, things work fine.

I am not creating the enum at runtime in the web service, I create it
beforehand and import it into my web service, but when I try to invoke any
operation on my web service I get that error.
I am using C#.

Any ideas?
Thank you very much.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top