hello guys i had hosted a silverlight application in Winhost and everything going ok until retreiving a big data amount about 3000 records from web service (http://www.softandmore.org/LibService.svc) i got an error : Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E) Timestamp: Mon, 14 Jun 2010 13:37:59 UTC Message: Unhandled Error in Silverlight Application Object reference not set to an instance of an object. at Library.Views.Result.client_BooksListCompleted(Object sender, BooksListCompletedEventArgs e) at Library.LibraryReference.LibServiceClient.OnBooksListCompleted(Object state) Line: 1 Char: 1 Code: 0 URI: http://www.softandmore.org/Caus-Library.aspx Message: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at Library.LibraryReference.ALLBooksListCompletedEventArgs.get_Result() at Library.Administration.Books.client_ALLBooksCompleted(Object sender, ALLBooksListCompletedEventArgs e) at Library.LibraryReference.LibServiceClient.OnALLBooksListCompleted(Object state) Line: 1 Char: 1 Code: 0 URI: http://www.softandmore.org/Caus-Library.aspx even after added this <dataContractSerializer maxItemsInObjectGraph="2147483647" /> to web.config i still have an error if i am retreiving about 100 rows it work ok. iam stucked on this how to solve ??? do i need to to something to get big numbers of rows to attach to datagrid Regards
Just another Winhost user here WOW - that's a lot of records for a Web control. Why not enable paging? If you use the WCF test tool, does it return the list without error?
Silverlight especially with WCF/RIA can be very difficult to troubleshoot. Most of the time the error your browser generates is really meaningless. I kind of suspect that issue is a connection to the database more then anything else but I'm just guessing at this point. Try downloading and installing Fiddler on your computer. It's a comprehensive logging tool that will log HTTP traffic coming in and out of your computer. From there we can decide on the next appropriate steps to take. You may want to close all browser sessions other then your Silverlight application when you are running this test. http://www.fiddler2.com/fiddler2/
mikev i don't think 3000 records are big enough to crash the web service and even doing paging this will not fix the problem. Ray i tried fiddler and found a weired thing that the web service don't responde a lot of bytes :| Request Count: 1 Bytes Sent: 632 Bytes Received: 207 ACTUAL PERFORMANCE -------------- ClientConnected: 21:50:35.884 ClientBeginRequest: 21:50:54.883 ClientDoneRequest: 21:50:54.884 Gateway Determination: 0ms DNS Lookup: 0ms TCP/IP Connect: 211ms ServerConnected: 21:50:55.096 FiddlerBeginRequest: 21:50:55.096 ServerGotRequest: 21:50:55.096 ServerBeginResponse: 21:51:01.995 ServerDoneResponse: 00:00:00.000 ClientBeginResponse: 00:00:00.000 ClientDoneResponse: 00:00:00.000 i tried to monitor this forum and the bytes response goes well is there something to be done to fix this ???
Ray another fiddler test shows a big amount of bytes but with a stop sign and no data in website below is the log Request Count: 1 Bytes Sent: 774 Bytes Received: 1,928,436 ACTUAL PERFORMANCE -------------- ClientConnected: 22:03:46.438 ClientBeginRequest: 22:04:07.785 ClientDoneRequest: 22:04:07.786 Gateway Determination: 0ms DNS Lookup: 0ms TCP/IP Connect: 0ms ServerConnected: 22:03:41.337 FiddlerBeginRequest: 22:04:07.786 ServerGotRequest: 22:04:07.786 ServerBeginResponse: 22:04:12.247 ServerDoneResponse: 22:06:03.749 ClientBeginResponse: 22:06:03.753 ClientDoneResponse: 22:06:03.753 Overall Elapsed: 00:01:55.9676329 thanks Sir
i have this log for the last reply 21:48:14:5213 Fiddler Running... 21:53:36:1437 [Fiddler] Failed to read HTTP request from () new client socket, port 49526. 22:05:37:4550 fiddler.network.readresponse.failure> Session #1 raised exception An existing connection was forcibly closed by the remote host
I often see the error "An existing connection was forcibly closed by the remote host " related to a database connection but the log doesn't specifically define it. I suggest you check your connection string and it should have a value timeout setting in the connection string. Try increasing that. Another test to try out is to create a simple Silverlight application that queries a database. Troubleshooting a full blown application is difficult because it has all kinds of components to it. Lastly if your application is making a call to a web service then I can also assume that that connection is also being dropped. Most of the time it maye the web service you are calling that maybe initiating the drop.