Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Services (http://www.velocityreviews.com/forums/f64-asp-net-web-services.html)
-   -   FileNotFoundException (http://www.velocityreviews.com/forums/t784119-filenotfoundexception.html)

Roger R. Smith 11-24-2004 12:54 AM

FileNotFoundException
 
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.



Dan Rogers 11-24-2004 05:50 PM

RE: FileNotFoundException
 
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" <rog_21@yahoo.com>
>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: <O4TosAc0EHA.3364@TK2MSFTNGP12.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
>NNTP-Posting-Host: 216.64.116.50
>Path:

cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP12
phx.gbl
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:26794
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>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.
>
>
>



Roger R. Smith 11-28-2004 04:07 PM

Re: FileNotFoundException
 
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" <danro@microsoft.com> wrote in message
news:2s3vb2k0EHA.3512@cpmsftngxa10.phx.gbl...
> 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" <rog_21@yahoo.com>
> >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: <O4TosAc0EHA.3364@TK2MSFTNGP12.phx.gbl>
> >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
> >NNTP-Posting-Host: 216.64.116.50
> >Path:

>

cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP12
> phx.gbl
> >Xref: cpmsftngxa10.phx.gbl

> microsoft.public.dotnet.framework.aspnet.webservic es:26794
> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
> >
> >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.
> >
> >
> >

>





All times are GMT. The time now is 09:48 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.