Professional Web Applications Themes

FileNotFoundException and Proxy constructor - ASP.NET Web Services

Hi, I have been reading several posts where people are getting a FileNotFoundException when trying to construct a web service proxy. The file that is reported missing changes everytime. There has been several different reasons for this in the past including permissions to the c:\winnt\temp folder, missing default constructor and duplicate enum definitions in the schema. Well, I have another reason for this to happen: I have an assembly that contains all the custom types my services use. When I reference my service in my WinForms app I have to modify the proxy that is generated for me; specifically I ...

  1. #1

    Default FileNotFoundException and Proxy constructor

    Hi,

    I have been reading several posts where people are getting a
    FileNotFoundException when trying to construct a web service proxy. The file
    that is reported missing changes everytime.

    There has been several different reasons for this in the past including
    permissions to the c:\winnt\temp folder, missing default constructor and
    duplicate enum definitions in the schema. Well, I have another reason for
    this to happen:

    I have an assembly that contains all the custom types my services use. When
    I reference my service in my WinForms app I have to modify the proxy that is
    generated for me; specifically I have to remove the generated definition for
    my types and add a USING statement so that it picks up my own type
    definitions. Everything was working fine until I started using a type when
    one of the properties was using the new (C#) operator to hide a property
    definition in a base class. This caused the proxy constructor to fail with
    the about error. Commenting out the property made everything work again.

    Can anyone explain this to me? Is it something to do with the XmlSerializer,
    if so what?

    Thanks for any help

    Graham Allwood


    Graham Allwood Guest

  2. #2

    Default Re: FileNotFoundException and Proxy constructor

    Ok, so I should learn not to post things too early, right? The problem
    wasn't the new operator on the property, it was because this property was
    read only.

    I'am wondering if I should implement ISerializable in order for me to stick
    with read only properties. Any comments?

    Graham

    "Graham Allwood" <NoToSpam-graham.allwoodeborsolutions.com> wrote in
    message news:%2311EvpfIEHA.3276TK2MSFTNGP09.phx.gbl...
    > Hi,
    >
    > I have been reading several posts where people are getting a
    > FileNotFoundException when trying to construct a web service proxy. The
    file
    > that is reported missing changes everytime.
    >
    > There has been several different reasons for this in the past including
    > permissions to the c:\winnt\temp folder, missing default constructor and
    > duplicate enum definitions in the schema. Well, I have another reason for
    > this to happen:
    >
    > I have an assembly that contains all the custom types my services use.
    When
    > I reference my service in my WinForms app I have to modify the proxy that
    is
    > generated for me; specifically I have to remove the generated definition
    for
    > my types and add a USING statement so that it picks up my own type
    > definitions. Everything was working fine until I started using a type when
    > one of the properties was using the new (C#) operator to hide a property
    > definition in a base class. This caused the proxy constructor to fail with
    > the about error. Commenting out the property made everything work again.
    >
    > Can anyone explain this to me? Is it something to do with the
    XmlSerializer,
    > if so what?
    >
    > Thanks for any help
    >
    > Graham Allwood
    >
    >

    Graham Allwood Guest

  3. #3

    Default Re: FileNotFoundException and Proxy constructor

    You can't use read only properties when you want your class to be
    serializable... It's a pitty I know, but when you think about it, it
    actually makes sense.

    --
    Greetz,
    Jan
    ________________________
    Read my weblog: [url]http://weblogs.asp.net/jan[/url]

    "Graham Allwood" <NoToSpam-graham.allwoodeborsolutions.com> schreef in
    bericht news:uVx$71hIEHA.3988tk2msftngp13.phx.gbl...
    > Ok, so I should learn not to post things too early, right? The problem
    > wasn't the new operator on the property, it was because this property was
    > read only.
    >
    > I'am wondering if I should implement ISerializable in order for me to
    stick
    > with read only properties. Any comments?
    >
    > Graham
    >
    > "Graham Allwood" <NoToSpam-graham.allwoodeborsolutions.com> wrote in
    > message news:%2311EvpfIEHA.3276TK2MSFTNGP09.phx.gbl...
    > > Hi,
    > >
    > > I have been reading several posts where people are getting a
    > > FileNotFoundException when trying to construct a web service proxy. The
    > file
    > > that is reported missing changes everytime.
    > >
    > > There has been several different reasons for this in the past including
    > > permissions to the c:\winnt\temp folder, missing default constructor and
    > > duplicate enum definitions in the schema. Well, I have another reason
    for
    > > this to happen:
    > >
    > > I have an assembly that contains all the custom types my services use.
    > When
    > > I reference my service in my WinForms app I have to modify the proxy
    that
    > is
    > > generated for me; specifically I have to remove the generated definition
    > for
    > > my types and add a USING statement so that it picks up my own type
    > > definitions. Everything was working fine until I started using a type
    when
    > > one of the properties was using the new (C#) operator to hide a property
    > > definition in a base class. This caused the proxy constructor to fail
    with
    > > the about error. Commenting out the property made everything work again.
    > >
    > > Can anyone explain this to me? Is it something to do with the
    > XmlSerializer,
    > > if so what?
    > >
    > > Thanks for any help
    > >
    > > Graham Allwood
    > >
    > >
    >
    >

    Jan Tielens 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. FileNotFoundException
    By Roger R. Smith in forum ASP.NET Web Services
    Replies: 2
    Last Post: November 28th, 04:07 PM
  3. WebServices and getting FileNotFoundException
    By Tim Mavers in forum ASP.NET Web Services
    Replies: 8
    Last Post: April 27th, 07:14 PM
  4. Calling SUPER::constructor in the constructor
    By Dan Anderson in forum PERL Beginners
    Replies: 5
    Last Post: February 1st, 02:26 PM
  5. WebServices and FileNotFoundException
    By Namit in forum ASP.NET Web Services
    Replies: 1
    Last Post: January 4th, 10:22 AM

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