Silverlight Show Thread Load Operation Failed Posts http://www.silverlightshow.net/Forums/wcf-ria-services/system-servicemodel-domainservices-client-operationbase-complete.aspx Silverlight Show Thread Load Operation Failed Posts http://backend.userland.com/rss Load Operation Failed <p>I've a domain service which communicates the database server and fetches the results from silver light hosted web app. It works find when I am debugging from "VS Development Server". But it throws the following error when I do it from IIS 7.</p> <p><br /> </p> <p>Message: Unhandled Error in Silverlight Application Object reference not set to an instance of an object.   <br /> at MyViewModel.invOp_Completed(Object sender, EventArgs e)<br />    at System.ServiceModel.DomainServices.Client.OperationBase.Completeed(Exception error)<br />    at System.ServiceModel.DomainServices.Client.InvokeOperation.Complete(Exception error)<br />    at System.ServiceModel.DomainServices.Client.DomainContext.CompleteInvoke(IAsyncResult asyncResult)<br />    at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass38.<InvokeOperation>b__34(Object )</p> http://www.silverlightshow.net/Forums/wcf-ria-services/system-servicemodel-domainservices-client-operationbase-complete.aspx dr63 10/3/2011 6:46:57 PM 1 <p>That is not much to go by since it is a basic null reference exception. If I had to guess based on experience, because IIS is running under a least privileged account by default, and the VS Development Server is running as you, the logged in user (which for most developers means admin), it is probably a permissions thing that means something in your code is not getting initialized and there is a subsequent null reference exception being thrown.</p> <p>Some debugging tips to try:</p> <p>- Add an override for the Initialize method and set a breakpoint in there. If you are not getting there, your domain service is not even getting loaded.</p> <p>- Put a breakpoint in your query method and see if it is being called</p> <p>- Run Fiddler or a similar HTTP debugging tool and inspect the error message being returned at a wire level</p> <p>- double check the structure of your<span style="font-family: 'segoe ui', helvetica, arial, verdana, tahoma, sans-serif; font-size: 12px; line-height: 20px;"> MyViewmodel.invOp_Completed method and make sure there are no accidental attempts to use something that is not initialized in there (possibly because there is really an error happening server side).</span></p> <p><span style="font-family: 'segoe ui', helvetica, arial, verdana, tahoma, sans-serif; font-size: 12px; line-height: 20px;">If those dont work, make sure you have read my article on debugging RIA apps:</span></p> <p><span style="font-family: 'segoe ui', helvetica, arial, verdana, tahoma, sans-serif; font-size: 12px; line-height: 20px;"><a href="http://www.silverlightshow.net/items/WCF-RIA-Services-Part-8-Testing-and-Debugging.aspx">http://www.silverlightshow.net/items/WCF-RIA-Services-Part-8-Testing-and-Debugging.aspx</a><br /> </span></p> <p><span style="font-family: 'segoe ui', helvetica, arial, verdana, tahoma, sans-serif;">And if that still fails, try posting a little more information here and I will see if I can help.</span></p> <p><span style="font-family: 'segoe ui', helvetica, arial, verdana, tahoma, sans-serif;">Brian</span></p> <p><br /> </p> http://www.silverlightshow.net/Forums/wcf-ria-services/system-servicemodel-domainservices-client-operationbase-complete.aspx brian.noyes 10/5/2011 2:22:44 AM