views:

39

answers:

2

I have an ASMX web service that is referenced by my silverlight front end, and have recently started getting the error "The remote server returned an error: Not Found". The error seems to be related to the fact that i have recently added associations between the tables (if i remove the associations, the service works fine). This seems to be similar to the error reported here , but he does not say how he solved the problem. I am using Silverlight 4, to an ASMX web service that uses LINQ to SQL. I was wondering whether the problem was simply too much data being returned, so I upped the HttpMaxRequest length and got the same problem. Any Ideas?

A: 

Silverlight will only display NotFound when your service crashes. Try setting a breakpoint on the server side code and step your way through. There is a server error somewhere.

danijels
I have set a breakpoint, and everything loads correctly. It is after it has returned that the error occurs. When break into debugger is switched on, it falls over on the "EndPoint" method in the self generated references class. I think it may be something to do with the size of the data being returned, so i tried to up the HTTPMaxRequest length, but that didn't help.
Ben
If there is a change in what your service returns, there might be something in there that is not supported in Silverlight (like anything under System.Data...). That would also result in your EndPoint throwing in the towel.
danijels
No, the I thought that as well, but the data types in the new tables are the same as those I am returning without a propblem, String, Integer etc.
Ben
I'm not necessarily referring to table field values returned, but all properties of objects in your response. Since you are saying that introducing associations gives you the error, than it is tempting to think that something changed in the response from the server due to this change. Maybe you could serialize the responses just before they are returned on the server and compare the serialized output.
danijels
A: 

The problem turned out to be that the LINQ to SQL was creating a circular reference, therefore not being able to serialize the objects. Fix found here

Ben