Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one silverlight application that reads the data from the database(SQL Server) using wcf services without using entity framework, on a click of a button. I deployed on my local system and it works fine. The same i deployed on the server and published it. I opened the page and clicked the button to get the data. But it doesn't display the data, also do not display any error. I am confused as to what could be the issue, on which side.
Posted

Have you changed your connection string on server. You can try to test if your app becomes data from server using Fiddler.

Good luck!
 
Share this answer
 
Your problem can have many reasons:

1) The Silverlight application cannot access the WCF service due to a cross domain issue.

Please read this: Making a Service Available Across Domain Boundaries: https://msdn.microsoft.com/en-us/library/cc197955%28VS.95%29.aspx[^]

2) The WCF service cannot access your SQL server due to missing rights

An application (your WCF service!) running in IIS
runs with a so-called Application-Pool Identity.
This is the default.

Please read:
http://www.iis.net/learn/manage/configuring-security/application-pool-identities[^]

If you run your application on your local system
everything runs with the currently logged on user and that is you.
On the productive system your WCF service runs with an application pool identity
probably "IIS AppPool\DefaultAppPool".

By using SQL Server Management Studio you must grant this user access to your database.

Moreover it is a good idea to use exception handling in your WCF service.
This article shows you how to do it:
Exception Handling in WCF[^]
This will allow you to find errors occurring during database access.
 
Share this answer
 
v2

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