Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi friends ı have a prb with Silverlight business application using wcf domain service class my application is work on LocalHost When ever ı put my application on server ı have 500 internal error and this information pop up on screan pls how ı will use entity framework database with silverlight on server not on desktop pls ı will be crazy already ı check all videos all tutorials but ı am still confuse what ı am missing ı just want database work on server with silverlight
C#
(Load operation failed for query 'GetCustomers'. The remote server returned an error: NotFound.
 
   at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
   at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error)
   at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
   at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<Load>b__17(Object )
)



After I search solution for fix my issue ı find one see

Solution Changing WCF address and endpoint values in “ServiceReferences.ClientConfig”.

Anyway, the first thing we need to do is to understand that “ServiceReferences.ClientConfig” that all silverlight applications have and use if they are connecting to a WCF sercvice, is just a simple XML file. Actually, not only an XML file but also a configuration file for the application.

You also need to know that the silverlight xap (*.xap) file that silverlight generates is a simple compressed (zipped) file. For this reason, you actually can rename the file to (something.zip) from (something.xap) and then you can access its content. The content of the xap file includes AppManifes.xaml, your application dlls and most importantly “ServiceReferences.ClientConfig”.

Now, when I tried to unzip it, change the content of one of its files and then re-zip it and rename it back to (something.xap), this has corrupted it. My application failed. I am not sure why. This was the case despite the fact that most posts about unpacking, unzipping and re-packaging the .xap file works.

What actually works is the following:
Rename the something.xap file to something.zip file. Open the zip file without unzipping (just double click on it) and then copy the file you want to edit, which in our case is the “ServiceReferences.ClientConfig” and paste it in a different location. Edit it and make all the changes you need to it and then copy it and paste back into the something.zip file. Replace the exisitng file there. Now go to something.zip and rename it back to something.xap.

Whatever change you have made should now work.
Posted
Updated 14-Sep-12 15:23pm
v2
Comments
Christian Amado 5-Sep-12 9:19am    
Can you improve your question adding the ServiceModel section of your web.config located on your server. Thanks.
db7uk 6-Sep-12 17:16pm    
You should include the webconfig containing the service model data. The error you are getting is a generic one. The service endpoint may not be reached but the error does not contain the full detail. This is right up my street so improve question with more detail and me or someone can help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900