Re: Error when WebMethod returns a jagged array

From: Bruce Johnson [C# MVP] (bruce_at_spammenot.objectsharp.com)
Date: 02/09/05


Date: Wed, 9 Feb 2005 06:15:07 -0800

1. Don't know for sure if the code that xsd generated for jagged arrays is
causing the problem. It could be something as simple as a property name that
happens to be a keyword in C#. I don't see that in your code, but then
again, I can't see all of the code.

2. It's the web.config file on the server that gets changed. You might
have to search around for the persisted file. I found it a challenge to find
the first time.

3. It's difficult to come up with a solution until I see why the file isn't
compiling. And I suspect when you do see it, the reason will be obvious.

Bruce Johnson [C# MVP]
http://www.objectsharp.com/blogs/bruce

"MikeL" wrote:

> Hi, Bruce. Thanks for responding.
>
> That certainly addresses my problem. If you don't mind I have three
> additional questions:
>
> 1) Why would XSD.exe generate jagged arrays if the generated code can't be
> compiled?
> 2) The article states to change the app's .config file. Is this the
> web.config file of my webservice project? The reason I ask is because that's
> exactly what I changed and nothing peristed.
> 3) The article offered no solution. Do you have any suggestions for a
> solution?
>
> Thanks again,
>
> Mike
>
> "Bruce Johnson [C# MVP]" <bruce@spammenot.objectsharp.com> wrote in message
> news:3E23F7BC-DDC7-445F-BD04-48D3F886BEAD@microsoft.com...
> > This type of error is usually indicative of something bad going on when
> > the
> > web service tries to generate the class that is used to serialize the
> > incoming and outgoing messages. Check out
> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp
> > to a description of how to identify these sorts of problems, paying
> > particular attention to the section towards the bottom that describes how
> > to
> > keep the compiled code around.
> >
> > Hope this helps.
> >
> > Bruce Johnson [C# MVP]
> > http://www.objectsharp.com/blogs/bruce
> >
> > "MikeL" wrote:
> >
> >> Hello.
> >>
> >> I've been getting an error message like the following when testing a
> >> webservice that I'm creating:
> >>
> >> "File or assembly name 8rsiphqb.dll, or one of its
> >> dependencies,
> >> was not found."
> >>
> >> Each time I refresh the page the .dll name changes, which tells me that
> >> the
> >> CLR is generating this .dll (right?)
> >>
> >> I think I narrowed down the problem: It seems only to happen when the
> >> return
> >> type of the WebMethod contains a jagged array. Here's what the XSD.exe
> >> utility generated from my schema:
> >>
> >> [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.myService.com/RatingHub")]
> >> [System.Xml.Serialization.XmlRootAttribute(Namespace="http://www.myService.com/RatingHub",
> >> IsNullable=false)]
> >>
> >> public class scPlan
> >>
> >> {
> >>
> >>
> >> /// <remarks/>
> >>
> >> [System.Xml.Serialization.XmlArrayItemAttribute(typeof(scTermRate),
> >> IsNullable=false)]
> >>
> >> public scTermRate[][] scTermRates;
> >>
> >>
> >> /// <remarks/>
> >>
> >> [System.Xml.Serialization.XmlArrayItemAttribute(typeof(scSurcharge),
> >> IsNullable=false)]
> >>
> >> public scSurcharge[][] scSurcharges;
> >>
> >>
> >> /// <remarks/>
> >>
> >> [System.Xml.Serialization.XmlAttributeAttribute()]
> >>
> >> public string code;
> >>
> >>
> >> /// <remarks/>
> >>
> >> [System.Xml.Serialization.XmlAttributeAttribute()]
> >>
> >> public string description;
> >>
> >> }
> >>
> >> When I set a breakpoint on the first line of the WebMethod in the .asmx
> >> file
> >> it is never reached, the error is generated in the browser.
> >>
> >> Does anyone know what's going on?
> >>
> >> Thanks in advance,
> >>
> >> Mike
> >>
> >>
> >>
>
>
>



Relevant Pages

  • Re: VB6 crashes after writing exe
    ... VB.exe to crash after compiling and writing the exe. ... Code that for some reason has a flaw that the compiler can not digest. ... the exe file. ... best thing to do is look careful at Your code and see where it could be ...
    (microsoft.public.vb.general.discussion)
  • Re: Forth input line buffered, why?
    ... whether interpreting or compiling waits for the user to type ... The main reason is that it's often desirable to manage the input stream while you're in it. ... I have seen implementations that compile a command line before executing it, in order to be able to use things like IF and DO in the command line, but I think executing before the user is finished typing would be very hard to get used to. ...
    (comp.lang.forth)
  • Re: OpenBSD seems Much Faster Than FreeBSD -- Why?
    ... Not that I've got any particular reason to doubt your impressions, ... you've offered exactly zero support for claims of one being faster than ... but most operating-system code benefits from staying ... What I'm getting at, is that compiling from source is, these days, ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Program Fails When Parameter Fixed Constants are Changed (F77) ??
    ... routine that aren't able to be resolved by the linker. ... for this _MIGHT_ be you're not compiling the module which now contains ... A reason for that could be as simple as you ... cause a link error. ...
    (comp.lang.fortran)
  • Re: Forth input line buffered, why?
    ... whether interpreting or compiling waits for the user to type ... Is there a reason for this, ... apart from avoiding the output getting mixed up with the input? ... emulate the buffer if in ANS mode. ...
    (comp.lang.forth)