Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi friends,
I have a silver light application and i want to access a database using wcf services. I know doing in normal windows application but in silver light it is some what different.

I have done the normal windows method of "adding service reference to our silver light project" but while i create a object to the service the methods in that service (which i have declared in wcf service add()) is not showing in my silver light application.

I am using silver light 4 and Visual Studio 2010

Friends Please provide me a solution or just post the site address where exact procedure shows.

Thanks in Advance
Ganesh
Posted

1 solution

A Silverlight application can only send requests to a webservice on the same server. So if the silverlight application is hosted on http://MyDevComputer then the webservice most be hosten on http://MyDevComputer as well.

And maybe this can help
4 Simple Steps to Consume WCF Service using Silverlight[^]
I haven't read the article, but I respect the author so I believe it's good if not great :)
 
Share this answer
 
Comments
Ganesh KP 4-Oct-11 5:02am    
Thank you Simon, I have tried the method that you post but it doesn't works.
If you know any other way,Please specify here.

Thanks once again
Ganesh
Simon Bang Terkildsen 4-Oct-11 5:04am    
I have no idea then, but if you post your wcf service I might, as that's the only other source of the problem I can think of.
Ganesh KP 28-Oct-11 3:14am    
I think there is no need with code it is same like in normal windows application but when i got adding a reference and calling the methods that are defined in the service i am unable to get them at the same time i am getting the name of my method as "ASYNC my method name".

How can i get from this/
If possible i will send you the necessary code.

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