FileNotFoundException

Discussion in 'ASP .Net Web Services' started by Roger R. Smith, Nov 24, 2004.

  1. 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, Nov 24, 2004
    #1
    1. Advertising

  2. Roger R. Smith

    Dan Rogers Guest

    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" <>
    >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: <>
    >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.
    >
    >
    >
    Dan Rogers, Nov 24, 2004
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:...
    > 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" <>
    > >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: <>
    > >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.
    > >
    > >
    > >

    >
    Roger R. Smith, Nov 28, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian
    Replies:
    1
    Views:
    3,246
    Rick Strahl [MVP]
    Dec 5, 2003
  2. Stephen Witter
    Replies:
    2
    Views:
    5,442
    Stephen Witter
    May 28, 2004
  3. msnews.microsoft.com

    System.IO.FileNotFoundException help

    msnews.microsoft.com, Jun 3, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    2,200
    msnews.microsoft.com
    Jun 3, 2004
  4. Martinh
    Replies:
    0
    Views:
    2,771
    Martinh
    Aug 15, 2004
  5. =?Utf-8?B?UmFqYQ==?=
    Replies:
    2
    Views:
    815
    bruce barker
    Sep 24, 2004
Loading...

Share This Page