Professional Web Applications Themes

FileNotFoundException - ASP.NET Web Services

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

  1. #1

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


    Roger R. Smith Guest

  2. #2

    Default 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>
    >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.3364TK2MSFTNGP12.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.
    >
    >
    >
    Dan Rogers Guest

  3. #3

    Default Re: FileNotFoundException

    Thank you Dan for the reply. I really appreciate it.
    I found out what happened by using [url]http://www.sellsbrothers.com[/url].
    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" <danromicrosoft.com> wrote in message
    news:2s3vb2k0EHA.3512cpmsftngxa10.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>
    > >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.3364TK2MSFTNGP12.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 Guest

Similar Threads

  1. CFFILE java.io.FileNotFoundException
    By RangerZ in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: May 4th, 01:20 PM
  2. WebServices and getting FileNotFoundException
    By Tim Mavers in forum ASP.NET Web Services
    Replies: 8
    Last Post: April 27th, 07:14 PM
  3. FileNotFoundException and Proxy constructor
    By Graham Allwood in forum ASP.NET Web Services
    Replies: 2
    Last Post: April 15th, 05:25 AM
  4. WebServices and FileNotFoundException
    By Namit in forum ASP.NET Web Services
    Replies: 1
    Last Post: January 4th, 10:22 AM
  5. WebServices and the FileNotFoundException problem
    By Tom in forum ASP.NET Web Services
    Replies: 0
    Last Post: July 28th, 02:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139